From 1c67104fc9ca6f106b93894ccac22c178f91c08c Mon Sep 17 00:00:00 2001 From: Sachin Neravath Date: Thu, 17 Nov 2022 19:17:43 +0530 Subject: [PATCH] fix(zoom): correct zoom position when using zoom-in icon fix #1423 --- src/plugins/zoom/lg-zoom.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/zoom/lg-zoom.ts b/src/plugins/zoom/lg-zoom.ts index c752ca7e6..72d1c5559 100644 --- a/src/plugins/zoom/lg-zoom.ts +++ b/src/plugins/zoom/lg-zoom.ts @@ -639,7 +639,12 @@ export default class Zoom { scale = this.getScale(scale); this.beginZoom(scale); - this.zoomImage(scale, this.settings.scale, true, true); + this.zoomImage( + scale, + Math.min(this.settings.scale, scale - this.scale), + true, + true, + ); } // Reset zoom effect