Skip to content

Commit fe505cd

Browse files
committed
fix(zoom): prevent resize during touchaction
1 parent 3c6a3bf commit fe505cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/plugins/zoom/lg-zoom.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,16 @@ export default class Zoom {
516516
}
517517
});
518518

519-
// Update zoom on resize and orientationchange
520519
this.core.LGel.on(
521520
`${lGEvents.containerResize}.zoom ${lGEvents.rotateRight}.zoom ${lGEvents.rotateLeft}.zoom ${lGEvents.flipHorizontal}.zoom ${lGEvents.flipVertical}.zoom`,
522521
() => {
523-
if (!this.core.lgOpened || !this.isImageSlide()) return;
522+
if (
523+
!this.core.lgOpened ||
524+
!this.isImageSlide() ||
525+
this.core.touchAction
526+
) {
527+
return;
528+
}
524529
const _LGel = this.core
525530
.getSlideItem(this.core.index)
526531
.find('.lg-img-wrap')

0 commit comments

Comments
 (0)