From 0fe5dad7697be9e2bbfd0ef5d0b67339ae9514e0 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 1 Jul 2017 00:12:41 +0200 Subject: [PATCH] zoom methods calls removed --- src/viewport.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/viewport.js b/src/viewport.js index cb534b68..e218e3d8 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -741,18 +741,9 @@ $.Viewport.prototype = { */ // Added to improve constrained panning getConstrainedBounds: function( immediately ) { - var actualZoom = this.getZoom(), - constrainedZoom = Math.max( - Math.min( actualZoom, this.getMaxZoom() ), - this.getMinZoom() - ), - bounds, + var bounds, constrainedBounds; - if ( actualZoom != constrainedZoom ) { - this.zoomTo( constrainedZoom, this.zoomPoint, immediately ); - } - bounds = this.getBounds(); constrainedBounds = this._applyBoundaryConstraints( bounds, immediately );