trailheadlabs / outerspatial-map-library

A Leaflet plugin built for use in OuterSpatial
https://www.trailheadlabs.com/labs/outerspatial-map-library/
Other
6 stars 1 forks source link

Marker "select" circle not working well with draggable markers #117

Closed nateirwin closed 6 years ago

nateirwin commented 6 years ago

To reproduce:

  1. Go here
  2. Click on "Update Marker Point" underneath the map
  3. Hover over the marker and drag it to a new location

Notice that the "select" circle does not move with the marker and old circles remain on the map after the marker is moved.

ryanjhodge commented 6 years ago

Not sure what the desired behavior is here, but what I initially did was deselect the marker on movestart, then select the marker on moveend. It works, but, if the cursor is not over the marker when the moveend event fires, the marker stays in the selected state until the user hovers over it and the mouseout event is fired.

The cursor and marker seem to come out of sync while in the drag state when the user starts dragging the marker and makes a sharp/fast mouse movement.

To get more consistent behavior I set the marker to not select again on movend.

nateirwin commented 6 years ago

Don't have time to pull and run locally, but I'm happy to take a look at this when it gets out on staging.