We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2b0df4 commit 47bd71bCopy full SHA for 47bd71b
1 file changed
src/core/pinch/pinch.logic.ts
@@ -18,7 +18,7 @@ const getTouchCenter = (event: TouchEvent) => {
18
let totalX = 0;
19
let totalY = 0;
20
// Sum up the positions of all touches
21
- for (let i = 0; i < 2; i++) {
+ for (let i = 0; i < 2; i += 1) {
22
totalX += event.touches[i].clientX;
23
totalY += event.touches[i].clientY;
24
}
@@ -75,7 +75,7 @@ export const handlePinchZoom = (
75
const panX = center.x - (contextInstance.pinchLastCenterX || 0);
76
const panY = center.y - (contextInstance.pinchLastCenterY || 0);
77
78
- if (newScale === scale && 0 == panX && 0 == panY) return;
+ if (newScale === scale && panX === 0 && panY === 0) return;
79
80
contextInstance.pinchLastCenterX = center.x;
81
contextInstance.pinchLastCenterY = center.y;
0 commit comments