Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add min/max scale limits for geo plots #7371

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
feat: handle maxscale default in scaleExtent
mojoaxel authored and camdecoster committed Feb 18, 2025
commit dd635ee36c1435fb50a1839348f546721bd1192a
2 changes: 1 addition & 1 deletion src/components/modebar/buttons.js
Original file line number Diff line number Diff line change
@@ -546,7 +546,7 @@ function handleGeo(gd, ev) {
var minscale = geoLayout.projection.minscale;
var maxscale = geoLayout.projection.maxscale;

if(maxscale < 0) maxscale = Infinity;
if(maxscale === -1) maxscale = Infinity;
var newScale = (val === 'in') ? 2 * scale : 0.5 * scale;

// make sure the scale is within the min/max bounds