Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
camdecoster wants to merge12 commits intomaster
base:master
Choose a base branch
Loading
fromcam/5192/add-min-max-scale-limits

Conversation

camdecoster
Copy link
Contributor

@camdecostercamdecoster commentedFeb 18, 2025
edited
Loading

Description

Addminscale 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

  • Addsminscale andmaxscale attributes to geo plots. Defaults are 0 and -1, respectively.
  • Enforces scale extents on zoom mouse events, mode bar button clicks
  • Manually creates zoom event to enforce scale extents on first render (treating the middle of the plot as the zoom point)

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

  • Start the dev dashboard withnpm start
  • Search for a geo mock and load it (I usedgeo_legendonly)
  • Zoom in and out and note how you can go as far as you want in either direction
  • Edit the mock file and add the following attributes under the"geo" key
    • "minscale": 2
    • "maxscale": 4
  • Reload the mock in the dashboard
  • Note that the mock appears zoomed in upon first load
  • Zoom in and out and note how you're now limited in how far you can go

@camdecostercamdecosterforce-pushed thecam/5192/add-min-max-scale-limits branch fromc7b5ec3 to29b4316CompareFebruary 18, 2025 14:15
@gvwilsongvwilson added P1needed for current cycle fixfixes something broken labelsFeb 18, 2025
@camdecoster
Copy link
ContributorAuthor

I believe that some tests are failing because there's now an extra zoom event on every call toupdateFx (fordragMode === 'pan'). I think I need to restrict that call to only happen upon first load. I'll keep looking into it.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alexcjohnsonalexcjohnsonAwaiting requested review from alexcjohnson

@emilyklemilyklAwaiting requested review from emilykl

@marthacryanmarthacryanAwaiting requested review from marthacryan

Assignees

@camdecostercamdecoster

Labels
fixfixes something brokenP1needed for current cycle
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

allow user to set zoom/scale limits for choropleth maps
3 participants
@camdecoster@gvwilson@mojoaxel

[8]ページ先頭

©2009-2025 Movatter.jp