mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
5d4178d067
Since drag-to-day (#891) a place pin swallows mousedown so the map holds still while a drag starts. Leaflet only clears its "the map was panned" flag on a mousedown it sees, so after one drag of the map it took every later click on a pin for the end of that pan and dropped it. Pins stayed dead until something else on the map was pressed, which is why zooming out and clicking a cluster brought them back. Trip planner and collections map were both affected; the GL renderers never were. Pressing a draggable pin now clears that flag itself by switching the map's pan handler off and on again, which is what the map would have done had it seen the press. The click keeps Leaflet's normal route, so it still closes an open popup on the map and still reaches listeners on the page, such as an open context menu. The new test file drives a real Leaflet map, since the mocked react-leaflet has no pan state to go stale.