miguelcobain/ember-leaflet

Leaflet icon/draggability bug, dragging object can be undefined for hidden markers (related to #77)

ludo-syt opened this issue · 2 comments

Hello there, I have an issue with the marker-layer "iconDidChange" observer, the "dragging" object is sometimes undefined.
Note that we use Ember Leaflet Marker Cluster and the bug appears in cluster mode. Hidden markers don't have the "dragging" property as they are not rendered, however iconDidChange is triggered for those markers.
Our markers are not draggable.

Maybe you can check that this._layer.dragging object is valid before calling enable/disable.
Leaflet doc says on "dragging" property : "Only valid when the marker is on the map" Doc

Thank you for your help

image
image

@ludo-syt released a fix on version 4.1.1.