From b8fc19d12e1b17ce34f64e919f43423e98e7ba28 Mon Sep 17 00:00:00 2001 From: Aleksandr Shoronov Date: Fri, 27 Sep 2024 08:57:39 +0300 Subject: [PATCH] Fixed pitch movement detection (internal-1879) --- src/ui/handler/touch_zoom_rotate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/handler/touch_zoom_rotate.ts b/src/ui/handler/touch_zoom_rotate.ts index 60ace95d51f..03c5c51b018 100644 --- a/src/ui/handler/touch_zoom_rotate.ts +++ b/src/ui/handler/touch_zoom_rotate.ts @@ -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; @@ -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;