From 5a23efce38c201a41cf33207d8dcf608e55ac8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Sat, 22 Feb 2020 06:23:59 +0100 Subject: [PATCH] fix pinchZoom (related #47) --- src/svg.panzoom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg.panzoom.js b/src/svg.panzoom.js index 5797de8..12c5783 100644 --- a/src/svg.panzoom.js +++ b/src/svg.panzoom.js @@ -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)