Skip to content

Commit

Permalink
fix: 🐛 linting
Browse files Browse the repository at this point in the history
  • Loading branch information
prc5 committed Jun 21, 2024
1 parent e2b0df4 commit 47bd71b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/pinch/pinch.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getTouchCenter = (event: TouchEvent) => {
let totalX = 0;
let totalY = 0;
// Sum up the positions of all touches
for (let i = 0; i < 2; i++) {
for (let i = 0; i < 2; i += 1) {
totalX += event.touches[i].clientX;
totalY += event.touches[i].clientY;
}
Expand Down Expand Up @@ -75,7 +75,7 @@ export const handlePinchZoom = (
const panX = center.x - (contextInstance.pinchLastCenterX || 0);
const panY = center.y - (contextInstance.pinchLastCenterY || 0);

if (newScale === scale && 0 == panX && 0 == panY) return;
if (newScale === scale && panX === 0 && panY === 0) return;

contextInstance.pinchLastCenterX = center.x;
contextInstance.pinchLastCenterY = center.y;
Expand Down

0 comments on commit 47bd71b

Please sign in to comment.