修复右键环视:RIGHT_DRAG 不存在,改用 MOUSE_MOVE
This commit is contained in:
@@ -396,12 +396,12 @@ export class CesiumGlobe {
|
||||
handler.setInputAction((movement) => {
|
||||
if (!this._lookState) return;
|
||||
const s = this._lookState;
|
||||
const dx = movement.position.x - s.lastX;
|
||||
const dy = movement.position.y - s.lastY;
|
||||
s.lastX = movement.position.x;
|
||||
s.lastY = movement.position.y;
|
||||
const dx = movement.endPosition.x - s.lastX;
|
||||
const dy = movement.endPosition.y - s.lastY;
|
||||
s.lastX = movement.endPosition.x;
|
||||
s.lastY = movement.endPosition.y;
|
||||
this._orbitAroundPivot(s.pivot, dx * LOOK_RATE, dy * LOOK_RATE);
|
||||
}, Cesium.ScreenSpaceEventType.RIGHT_DRAG);
|
||||
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
||||
|
||||
handler.setInputAction(() => {
|
||||
if (!this._lookState) return;
|
||||
|
||||
Reference in New Issue
Block a user