修复右键环视:RIGHT_DRAG 不存在,改用 MOUSE_MOVE

This commit is contained in:
2026-09-19 14:25:29 +08:00
parent 3bbfedeefa
commit 656f535467
+5 -5
View File
@@ -396,12 +396,12 @@ export class CesiumGlobe {
handler.setInputAction((movement) => { handler.setInputAction((movement) => {
if (!this._lookState) return; if (!this._lookState) return;
const s = this._lookState; const s = this._lookState;
const dx = movement.position.x - s.lastX; const dx = movement.endPosition.x - s.lastX;
const dy = movement.position.y - s.lastY; const dy = movement.endPosition.y - s.lastY;
s.lastX = movement.position.x; s.lastX = movement.endPosition.x;
s.lastY = movement.position.y; s.lastY = movement.endPosition.y;
this._orbitAroundPivot(s.pivot, dx * LOOK_RATE, dy * LOOK_RATE); this._orbitAroundPivot(s.pivot, dx * LOOK_RATE, dy * LOOK_RATE);
}, Cesium.ScreenSpaceEventType.RIGHT_DRAG); }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
handler.setInputAction(() => { handler.setInputAction(() => {
if (!this._lookState) return; if (!this._lookState) return;