loleaflet: remove the bounding rectangle when the hook is removed
Change-Id: I9475c2297882fb848010996087374af5dde3d214
This commit is contained in:
parent
1c191865ec
commit
5822737a84
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ L.Handler.PathTransform = L.Handler.extend({
|
|||
.off('dragstart', this._onDragStart, this)
|
||||
.off('drag', this._onDrag, this)
|
||||
.off('dragend', this._onDragEnd, this);
|
||||
|
||||
if (this._map.hasLayer(this._rect)) {
|
||||
this._map.removeLayer(this._rect);
|
||||
}
|
||||
|
||||
this._handlersGroup = null;
|
||||
this._rect = null;
|
||||
this._handlers = [];
|
||||
|
|
Loading…
Reference in a new issue