Skip to content

Commit

Permalink
fix: TOUCH_DOLLY_ROTATE seems to be exactly like TOUCH_ZOOM_ROTATE (#304
Browse files Browse the repository at this point in the history
)

* fix: TOUCH_DOLLY_ROTATE seems to be exactly like TOUCH_ZOOM_ROTATE

* build
  • Loading branch information
yomotsu authored Sep 17, 2022
1 parent 6556f6e commit 1f3dee2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/camera-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@
const dollyX = this.dollyToCursor ? (lastDragPosition.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0;
const dollyY = this.dollyToCursor ? (lastDragPosition.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
this._state === ACTION.TOUCH_DOLLY ||
this._state === ACTION.TOUCH_DOLLY_ROTATE ||
this._state === ACTION.TOUCH_DOLLY_TRUCK ||
this._state === ACTION.TOUCH_DOLLY_OFFSET ?
this._dollyInternal(dollyDelta * TOUCH_DOLLY_FACTOR, dollyX, dollyY) :
Expand Down
2 changes: 1 addition & 1 deletion dist/camera-controls.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/camera-controls.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ class CameraControls extends EventDispatcher {
const dollyX = this.dollyToCursor ? (lastDragPosition.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0;
const dollyY = this.dollyToCursor ? (lastDragPosition.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
this._state === ACTION.TOUCH_DOLLY ||
this._state === ACTION.TOUCH_DOLLY_ROTATE ||
this._state === ACTION.TOUCH_DOLLY_TRUCK ||
this._state === ACTION.TOUCH_DOLLY_OFFSET ?
this._dollyInternal(dollyDelta * TOUCH_DOLLY_FACTOR, dollyX, dollyY) :
Expand Down
1 change: 1 addition & 0 deletions src/CameraControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ export class CameraControls extends EventDispatcher {
const dollyY = this.dollyToCursor ? ( lastDragPosition.y - this._elementRect.y ) / this._elementRect.height * - 2 + 1 : 0;

this._state === ACTION.TOUCH_DOLLY ||
this._state === ACTION.TOUCH_DOLLY_ROTATE ||
this._state === ACTION.TOUCH_DOLLY_TRUCK ||
this._state === ACTION.TOUCH_DOLLY_OFFSET ?
this._dollyInternal( dollyDelta * TOUCH_DOLLY_FACTOR, dollyX, dollyY ) :
Expand Down

0 comments on commit 1f3dee2

Please sign in to comment.