Skip to content

Commit

Permalink
scroll prevented
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Sep 13, 2024
1 parent 48144e0 commit 3dc3750
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/basic/PinchZoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export default class PinchZoomView extends AtomControl {
this.bindEvent(scrollView, "touchstart", (evs: TouchEvent) => {

previous = center(evs);
evs.preventDefault();
evs.stopImmediatePropagation?.();
// evs.preventDefault();
// evs.stopImmediatePropagation?.();

// const start = this.zoom.scale;

Expand All @@ -121,6 +121,10 @@ export default class PinchZoomView extends AtomControl {
if (previousDistance === newScale) {
return;
}

ev.preventDefault();
ev.stopImmediatePropagation();

scale += newScale - previousDistance;
previousDistance = newScale;
this.updateZoom({
Expand Down

0 comments on commit 3dc3750

Please sign in to comment.