Commit 3b2bd2e0 by Tianqing Liu

fix: 调整时间线,刻度样式

1 parent 6c813a48
......@@ -381,7 +381,6 @@ export default {
let line_px = (this.scaleLine_minute * 60) / this.px_second;
for (let i = p; i <= (this.canvasWidth + 1); i += line_px) {
let date = this.firstTime + i * this.px_second * 1000;
let time1 = moment(date).format("HH:mm");
if (
(this.realTimeRange[0] && date < new Date(this.realTimeRange[0]).getTime()) ||
(this.realTimeRange[1] && date > (new Date(this.realTimeRange[1]).getTime() + 1000))
......@@ -391,7 +390,8 @@ export default {
let time = moment(date).format("HH:mm");
this.ctx.beginPath();
this.ctx.moveTo(i, 5);
this.ctx.lineTo(i, this.showTime(time) ? 17 : 10);
// !!! 控制刻度的高低
this.ctx.lineTo(i, this.showTime(time) ? 17 : 13);
this.ctx.strokeStyle = this.showTime(time)?this.colors.scaleLine:this.colors.minscaleLine;
this.ctx.lineWidth = 1;
this.ctx.stroke();
......@@ -523,7 +523,8 @@ export default {
: item.endTime;
let sx = (new Date(beginTime).getTime() - this.firstTime) / 1000 / this.px_second;
let ex = (new Date(endTime).getTime() - this.firstTime) / 1000 / this.px_second;
this.ctx.fillRect(sx, 0, ex - sx, 6);
// !!! 控制录音条的高度
this.ctx.fillRect(sx, 0, ex - sx, 8);
});
},
//获取点坐标的距离(用于移动端双指放大缩小手势识别)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!