fix memory leak generated by setIcon
when setIcon is called this.dragging is replaced without be disabled before, so hooks remains active.
This commit is contained in:
parent
112ac5b4b6
commit
aeea88b9fc
@ -209,6 +209,10 @@ L.Marker = L.Layer.extend({
|
||||
this._fireMouseEvent, this);
|
||||
|
||||
if (L.Handler.MarkerDrag) {
|
||||
if (this.dragging) {
|
||||
this.dragging.disable();
|
||||
}
|
||||
|
||||
this.dragging = new L.Handler.MarkerDrag(this);
|
||||
|
||||
if (this.options.draggable) {
|
||||
|
Loading…
Reference in New Issue
Block a user