修复触控缩放无法返回建筑外观
This commit is contained in:
@@ -1638,18 +1638,22 @@ const easeInOutCubic = (t: number) => (
|
||||
)
|
||||
|
||||
const cancelCameraTween = (options: { manual?: boolean } = {}) => {
|
||||
if (cameraTween) {
|
||||
const interruptedCameraTween = Boolean(cameraTween)
|
||||
if (interruptedCameraTween) {
|
||||
cameraTween = null
|
||||
}
|
||||
if (options.manual) {
|
||||
// 手动手势必须立即接管相机,避免已结束动画遗留的保护状态继续拦截自动切换。
|
||||
// 手动手势必须立即接管相机,避免相机动画的保护状态继续拦截自动切换。
|
||||
isProgrammaticCameraChange = false
|
||||
clearProgrammaticCameraTimer()
|
||||
const distance = controls?.getDistance()
|
||||
if (typeof distance === 'number' && Number.isFinite(distance)) {
|
||||
if (activeView.value === 'floor') {
|
||||
// 用户中断楼层初始拟合时,使用中断后的稳定距离重新建立退出基准。
|
||||
autoSwitchStateMachine.setFloorInitialDistance(distance)
|
||||
|
||||
if (interruptedCameraTween) {
|
||||
const distance = controls?.getDistance()
|
||||
if (typeof distance === 'number' && Number.isFinite(distance)) {
|
||||
if (activeView.value === 'floor') {
|
||||
// 用户中断楼层初始拟合时,使用中断后的稳定距离重新建立退出基准。
|
||||
autoSwitchStateMachine.setFloorInitialDistance(distance)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user