From 16fc72d8fbc16ea69ad8738eeb6b6920cb5110ae Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 7 Feb 2023 18:12:26 -0500 Subject: [PATCH] Take zoom constraint into account within _fitBounds when constraints = true and immediately = false --- src/viewport.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/viewport.js b/src/viewport.js index 187822a3..a9c3913a 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -711,6 +711,8 @@ $.Viewport.prototype = { if(constraints){ this.panTo(center, false); + + newZoom = this._applyZoomConstraints(newZoom); this.zoomTo(newZoom, null, false); var constrainedBounds = this.getConstrainedBounds();