修改进度条不用拖拽就能动问题
This commit is contained in:
@ -82,21 +82,24 @@ export default class TimeLine {
|
|||||||
}
|
}
|
||||||
moveComplay(func) {
|
moveComplay(func) {
|
||||||
let that = this
|
let that = this
|
||||||
that.timeline.addEventListener('mouseup', () => {
|
// that.timeline.addEventListener('mouseup', () => {
|
||||||
that.isDragging = false;
|
document.addEventListener('mouseup', () => {
|
||||||
if (that.manualPosition !== null) {
|
if (that.isDragging) {
|
||||||
// that.sdk.viewer.clock.shouldAnimate = true
|
that.isDragging = false;
|
||||||
that.startTime = Date.now() - (that.manualPosition * 86400 * 1000 / that.speed);
|
if (that.manualPosition !== null) {
|
||||||
that.manualPosition = null;
|
// that.sdk.viewer.clock.shouldAnimate = true
|
||||||
that.changeDate && (that.changeDateGrag = true)
|
that.startTime = Date.now() - (that.manualPosition * 86400 * 1000 / that.speed);
|
||||||
if (!that.pauseed) {
|
that.manualPosition = null;
|
||||||
that.update()
|
that.changeDate && (that.changeDateGrag = true)
|
||||||
func(that.time)
|
if (!that.pauseed) {
|
||||||
} else {
|
that.update()
|
||||||
that.pausedTime = Date.now(); // 记录暂停时刻
|
func(that.time)
|
||||||
func(that.currentTime.textContent)
|
} else {
|
||||||
}
|
that.pausedTime = Date.now(); // 记录暂停时刻
|
||||||
|
func(that.currentTime.textContent)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user