Skip to content

Commit d770efb

Browse files
authored
fix: zoom does not work when pinching on mobile (#499)
1 parent 5cf057b commit d770efb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/core/instance.core.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,10 @@ export class ZoomPanPinch {
391391

392392
if (!isAllowed) return;
393393

394-
const isDoubleTap = this.lastTouch && +new Date() - this.lastTouch < 200;
394+
const isDoubleTap =
395+
this.lastTouch &&
396+
+new Date() - this.lastTouch < 200 &&
397+
event.touches.length === 1;
395398

396399
if (!isDoubleTap) {
397400
this.lastTouch = +new Date();

0 commit comments

Comments
 (0)