Skip to content

Commit ee8597f

Browse files
committed
Add event check before triggering zoom transition
1 parent 0a1f133 commit ee8597f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/plots/geo/geo.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,8 @@ proto.updateFx = function(fullLayout, geoLayout) {
486486
bgRect.node().onmousedown = null;
487487
var zoom = createGeoZoom(_this, geoLayout)
488488
bgRect.call(zoom);
489-
// TODO: Figure out how to restrict when this transition occurs. Or is it a no-op if nothing has changed?
490-
// Trigger transition to handle if minscale attribute isn't 0
491-
zoom.event(bgRect)
489+
// Trigger zoom transition to account for min/max scale values
490+
if (geoLayout.projection.minscale > 0 && !d3.event) zoom.event(bgRect);
492491
bgRect.on('dblclick.zoom', zoomReset);
493492
if(!gd._context._scrollZoom.geo) {
494493
bgRect.on('wheel.zoom', null);

0 commit comments

Comments
 (0)