Skip to content

Commit

Permalink
fix(zoom): correct zoom position when using zoom-in icon
Browse files Browse the repository at this point in the history
fix #1423
  • Loading branch information
sachinchoolur committed Nov 17, 2022
1 parent 7219afe commit 1c67104
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugins/zoom/lg-zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c67104

Please sign in to comment.