Skip to content

Commit

Permalink
fix pinchZoom (related #47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzyma committed Feb 22, 2020
1 parent d739a1d commit 5a23efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svg.panzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ extend(Svg, {
const focusP = this.point(2 * currentFocus.x - lastFocus.x, 2 * currentFocus.y - lastFocus.y)
const box = new Box(this.viewbox()).transform(
new Matrix()
.translate(-focusP.x, -focusP.y)
.translate(p.x, p.y)
.scale(zoomAmount, 0, 0)
.translate(-focusP.x, -focusP.y)
)

this.viewbox(box)
Expand Down

0 comments on commit 5a23efc

Please sign in to comment.