Stop animation before destroy map (#5876)
* Null ref fix: TypeError: Cannot read property latLngToLayerPoint of null\n at NewClass.update (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7295:23)\n at NewClass.setLatLng (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7256:8)\n * stop animation before destroy map
This commit is contained in:
parent
f6e1a9be91
commit
50b77520b3
@ -722,6 +722,8 @@ export var Map = Evented.extend({
|
||||
this._containerId = undefined;
|
||||
}
|
||||
|
||||
this._stop();
|
||||
|
||||
DomUtil.remove(this._mapPane);
|
||||
|
||||
if (this._clearControlPos) {
|
||||
@ -1627,7 +1629,9 @@ export var Map = Evented.extend({
|
||||
_onZoomTransitionEnd: function () {
|
||||
if (!this._animatingZoom) { return; }
|
||||
|
||||
DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
|
||||
if (this._mapPane) {
|
||||
DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
|
||||
}
|
||||
|
||||
this._animatingZoom = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user