Skip to content

Commit

Permalink
fix(zoom): Ensure the zoom module's array is cleared onTouchEnd to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
broox authored Jan 2, 2025
1 parent c4619bb commit 21610bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/zoom/zoom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
const mousePanSensitivity = -3; // Negative to invert pan direction
let fakeGestureTouched;
let fakeGestureMoved;
let preventZoomOut;
const evCache = [];
const gesture = {
originX: 0,
Expand Down Expand Up @@ -391,6 +390,7 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
}
function onTouchEnd() {
const zoom = swiper.zoom;
evCache.length = 0;
if (!gesture.imageEl) return;
if (!image.isTouched || !image.isMoved) {
image.isTouched = false;
Expand Down

0 comments on commit 21610bd

Please sign in to comment.