From 256514bca6da2064a53b598f095e650d68e136c9 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 6 Dec 2022 16:52:48 -0500 Subject: [PATCH] small cleanup --- src/viewport.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/viewport.js b/src/viewport.js index 05a2b5c5..afbfbae7 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -709,8 +709,6 @@ $.Viewport.prototype = { return this; } - var referencePoint; - if(constraints){ this.panTo(center, false); this.zoomTo(newZoom, null, false); @@ -725,7 +723,7 @@ $.Viewport.prototype = { // this.zoomTo(newZoom, referencePoint, immediately); } else { var rotatedNewBounds = newBounds.rotate(-this.getRotation()); - referencePoint = rotatedNewBounds.getTopLeft().times(newZoom) + var referencePoint = rotatedNewBounds.getTopLeft().times(newZoom) .minus(oldBounds.getTopLeft().times(oldZoom)) .divide(newZoom - oldZoom);