From e2657ce0a8a8946687a451a4cb4ad333955af3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Tue, 5 Aug 2025 09:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=E4=B8=8D=E7=94=A8=E6=8B=96=E6=8B=BD=E5=B0=B1=E8=83=BD=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/efflect/Sunshine/timeLIne.js | 31 ++++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/Global/efflect/Sunshine/timeLIne.js b/src/Global/efflect/Sunshine/timeLIne.js index c7dfa3f..f6155e9 100644 --- a/src/Global/efflect/Sunshine/timeLIne.js +++ b/src/Global/efflect/Sunshine/timeLIne.js @@ -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) + } + } } }); }