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

Fixed Mapbox Touch Event on Mobile After Switching Back from Select Mode #6281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mmtmr
Copy link

@mmtmr mmtmr commented Jul 28, 2022

Note: "Mobile" in the following context means touch screen device.

Issue: When mobile user switched back to "Pan" mode from "Box Select" or "Lasso Select" on the mapbox graph, the user is unable to trigger events (eg: hover, click) that are initially trigger-able before switching to "Select" mode.

Problem: The event listener of "touchStart" is not removed.

Solution: Added remove event listener of "touchStart" code below remove event listener of "mouseDown" code when the mapbox graph is not in "Select" mode.

Other Observation: Double Touch on Screen to Clear Selection on "Pan" mode is not working after implementing this solution. But I guess it shouldn't be working at first since double click on "Pan" in non-mobile settings is also not clearing the selection.

Example: First graph in https://plotly.com/python/mapbox-layers/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants