I am trying to make leaflet markers snap to a grid (e.g. 10px) when dragging.
The only method I can think of so far is to re-implement
L.Draggable so that the
offset calculated in
_onMove is rounded to the nearest multiple of the grid size.
Is this the best way to do this? (Will it even work to override it then re-assign it to
I have seen plenty of questions about snapping features to another feature, which is relatively easy since you can just listen to
dragend and do the snap at the end of the move. In this case I need to snap each 'drag'..