Skip to content

Commit

Permalink
Fixed pitch movement detection (internal-1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
underoot committed Sep 27, 2024
1 parent 67672bc commit b8fc19d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/handler/touch_zoom_rotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class TouchPitchHandler extends TwoTouchHandler {

if (this._map._cooperativeGestures && !isFullscreen() && e.touches.length < 3) return;

this._valid = !!this.gestureBeginsVertically(vectorA, vectorB, e.timeStamp);
this._valid = this.gestureBeginsVertically(vectorA, vectorB, e.timeStamp);

if (!this._valid) return;

Expand All @@ -256,7 +256,7 @@ export class TouchPitchHandler extends TwoTouchHandler {
};
}

gestureBeginsVertically(vectorA: Point, vectorB: Point, timeStamp: number): void | boolean {
gestureBeginsVertically(vectorA: Point, vectorB: Point, timeStamp: number): undefined | boolean {
if (this._valid !== undefined) return this._valid;

const threshold = 2;
Expand Down

0 comments on commit b8fc19d

Please sign in to comment.