Merge branch 'develop' of http://xny.yj-3d.com:3000/zh/sdk4.0
This commit is contained in:
@ -82,21 +82,24 @@ export default class TimeLine {
|
||||
}
|
||||
moveComplay(func) {
|
||||
let that = this
|
||||
that.timeline.addEventListener('mouseup', () => {
|
||||
that.isDragging = false;
|
||||
if (that.manualPosition !== null) {
|
||||
// that.sdk.viewer.clock.shouldAnimate = true
|
||||
that.startTime = Date.now() - (that.manualPosition * 86400 * 1000 / that.speed);
|
||||
that.manualPosition = null;
|
||||
that.changeDate && (that.changeDateGrag = true)
|
||||
if (!that.pauseed) {
|
||||
that.update()
|
||||
func(that.time)
|
||||
} else {
|
||||
that.pausedTime = Date.now(); // 记录暂停时刻
|
||||
func(that.currentTime.textContent)
|
||||
}
|
||||
// that.timeline.addEventListener('mouseup', () => {
|
||||
document.addEventListener('mouseup', () => {
|
||||
if (that.isDragging) {
|
||||
that.isDragging = false;
|
||||
if (that.manualPosition !== null) {
|
||||
// that.sdk.viewer.clock.shouldAnimate = true
|
||||
that.startTime = Date.now() - (that.manualPosition * 86400 * 1000 / that.speed);
|
||||
that.manualPosition = null;
|
||||
that.changeDate && (that.changeDateGrag = true)
|
||||
if (!that.pauseed) {
|
||||
that.update()
|
||||
func(that.time)
|
||||
} else {
|
||||
that.pausedTime = Date.now(); // 记录暂停时刻
|
||||
func(that.currentTime.textContent)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user