Correctly cleanup CoordinatesControl event handlers
This commit is contained in:
parent
f1d38e7485
commit
00483025cd
@ -81,9 +81,9 @@ export class CoordinatesControl extends Control {
|
||||
return this;
|
||||
}
|
||||
|
||||
this._map.on('mousemove', this._onMouseMove, this);
|
||||
this._map.on('mouseout', this._onMouseOut, this);
|
||||
Control.prototype.remove.call(this);
|
||||
this._map.off('mousemove', this._onMouseMove, this);
|
||||
this._map.off('mouseout', this._onMouseOut, this);
|
||||
super.remove();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user