Skip to content

Commit

Permalink
Fix regression caused by camera controls mapping feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlal99 committed Nov 1, 2024
1 parent 40cefd0 commit 4496456
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/viewer/scene/CameraControl/CameraControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,17 @@ class CameraControl extends Component {
return false;
}

_isMouseAction(action) {
switch (action) {
case this.MOUSE_ROTATE:
case this.MOUSE_DOLLY:
case this.MOUSE_PAN:
return true;
default:
return false;
}
}

/**
* Returns true if any keys configured for the given action are down.
* @param action
Expand All @@ -983,7 +994,7 @@ class CameraControl extends Component {
if (!keys) {
return false;
}
if (keys.length === 0) return true;
if (keys.length === 0 && this._isMouseAction(action)) return true;
if (!keyDownMap) {
keyDownMap = this.scene.input.keyDown;
}
Expand Down

0 comments on commit 4496456

Please sign in to comment.