Do not cancel when panning
This commit is contained in:
parent
a94fb753a1
commit
de150c0105
6 changed files with 16 additions and 6 deletions
2
dist/pinch-zoom-min.js
vendored
2
dist/pinch-zoom-min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pinch-zoom.cjs.js
vendored
2
dist/pinch-zoom.cjs.js
vendored
|
@ -99,8 +99,10 @@ class PinchZoom extends HTMLElement {
|
|||
const handled = !(isPan && !this._allowPan());
|
||||
if (handled) {
|
||||
this._maybeStopPropagate(event);
|
||||
if (!isPan) { // only cancel if something was propagated
|
||||
this._maybeEmitCancel([pointer, ...pointerTracker.currentPointers]);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
return true;
|
||||
},
|
||||
|
|
2
dist/pinch-zoom.es.js
vendored
2
dist/pinch-zoom.es.js
vendored
|
@ -95,8 +95,10 @@ class PinchZoom extends HTMLElement {
|
|||
const handled = !(isPan && !this._allowPan());
|
||||
if (handled) {
|
||||
this._maybeStopPropagate(event);
|
||||
if (!isPan) { // only cancel if something was propagated
|
||||
this._maybeEmitCancel([pointer, ...pointerTracker.currentPointers]);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
return true;
|
||||
},
|
||||
|
|
2
dist/pinch-zoom.js
vendored
2
dist/pinch-zoom.js
vendored
|
@ -280,8 +280,10 @@ var PinchZoom = (function () {
|
|||
const handled = !(isPan && !this._allowPan());
|
||||
if (handled) {
|
||||
this._maybeStopPropagate(event);
|
||||
if (!isPan) { // only cancel if something was propagated
|
||||
this._maybeEmitCancel([pointer, ...pointerTracker.currentPointers]);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
return true;
|
||||
},
|
||||
|
|
2
dist/pinch-zoom.mjs
vendored
2
dist/pinch-zoom.mjs
vendored
|
@ -95,8 +95,10 @@ class PinchZoom extends HTMLElement {
|
|||
const handled = !(isPan && !this._allowPan());
|
||||
if (handled) {
|
||||
this._maybeStopPropagate(event);
|
||||
if (!isPan) { // only cancel if something was propagated
|
||||
this._maybeEmitCancel([pointer, ...pointerTracker.currentPointers]);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
return true;
|
||||
},
|
||||
|
|
|
@ -125,8 +125,10 @@ export default class PinchZoom extends HTMLElement {
|
|||
const handled = !(isPan && !this._allowPan());
|
||||
if (handled) {
|
||||
this._maybeStopPropagate(event);
|
||||
if (!isPan) { // only cancel if something was propagated
|
||||
this._maybeEmitCancel([pointer, ...pointerTracker.currentPointers]);
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue