Skip to content

Commit

Permalink
fix(Zoom): use zoom state
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGlt committed Oct 15, 2024
1 parent 4f53025 commit 426fe29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controls/StateControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class StateControl extends THREE.EventDispatcher {
touchToState(finger) {
for (const key of Object.keys(DEFAULT_STATES)) {
const state = this[key];
if (state.enable && finger == state.finger) {
if (state.enable && finger === state.finger) {
return state;
}
}
Expand Down Expand Up @@ -396,7 +396,7 @@ class StateControl extends THREE.EventDispatcher {

if (this.enabled && this.ZOOM.enable) {
viewCoords.copy(this._view.eventToViewCoords(event));
this.currentState = this.NONE;
this.currentState = this.ZOOM;
this.dispatchEvent({ type: this.ZOOM._event, delta: event.deltaY, viewCoords });
}
}
Expand Down

0 comments on commit 426fe29

Please sign in to comment.