-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Mapbox select doesn't update with scrollzoom #2343
Comments
Same goes for all subplot types. Maybe we should just clear the selection region on scroll (not the selected points of course). |
Ok this is actually a little different for cartesian subplots. My mistake. Starting from https://codepen.io/etpinard/pen/xYRqOj?editors=0010 we get: that is the select box does not clear on scroll zoom (just like on mapbox subplots) but does clear on scroll end. The cartesian behavior is little bit better but still not right. I still think clearing the select box on scroll start for all subplot types would be the cleanest way to fix this bug. But thinking about #1851, we might have to come up with something more powerful. We can't just describe select box and lasso path in data coordinates (e.g. like data-ref annotations) because on non-cartesian subplot select box and lasso paths are allowed to extend pass the subplot's plot area e.g. for polar: |
👍
As part of #1851 we could consider making the selection outline persist through scroll/zoom for cartesian subplots but I don't feel like that's a particularly valuable addition, and as you point out it won't work for other subplot types. Extending past the plot area is one issue, though in principle we could sort that out by using the natural extension of the data<->px mapping. But a bigger problem is that for some subplot types - polar and geo at least - a rectangle is no longer necessarily a rectangle after you zoom, straight lines are no longer straight. So even if you were able to properly transform the selection region into one with curved boundaries, we wouldn't be able to use the same UI to modify the region afterward. |
- see #2343 (comment) for more details on this issue.
If you scrollzoom on a Mapbox map with a selection, the selection box (or lasso) does not update its size after zooming:
The text was updated successfully, but these errors were encountered: