-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Add min/max scale limits for geo plots #7371
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
base: master
Are you sure you want to change the base?
Conversation
c7b5ec3
to
29b4316
Compare
I believe that some tests are failing because there's now an extra zoom event on every call to |
maxscale: { | ||
valType: 'number', | ||
min: 0, | ||
dflt: -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try setting dflt: 0
in the API and handle the case of zero instead of -1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We represent Infinity
with -1 since Infinity
isn't valid in JSON. If we made this change, how would we handle when a user wants to use Infinity
instead of 0 (which is also a valid value).
Opening
@camdecoster do you get the same? |
@archmoj that should be fixed by some recent commits. Are you on the latest version of the branch? I'm not seeing that error. |
Thanks @camdecoster. My local test branch was not up-to-date. I confirm now it renders with no error. |
If you add
to @camdecoster Could you please investigate that? |
Here is a codepen displaying the bug. |
Description
Add
minscale
andmaxscale
attributes to geo plots. These set the min and max scale extents for a plot (how far a user can zoom out/in). This PR supersedes #5192 which will be closed after this is merged.Changes
minscale
andmaxscale
attributes to geo plots. Defaults are 0 and -1, respectively.Demo Video or Screenshot(s):
Before:
Screencast.From.2025-02-22.11-25-20.mp4
After:
Screencast.From.2025-02-22.11-29-21.mp4
Testing
npm start
"geo"
key"minscale": 2
"maxscale": 4