Fixed Mapbox Touch Event on Mobile After Switching Back from Select Mode
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/