|
358 | 358 |
|
359 | 359 | L.DomEvent.on(this._map, "movestart", this._handleDragging, this);
|
360 | 360 | L.DomEvent.on(this._map, "move", this._handleDragging, this);
|
361 |
| - L.DomEvent.on(this._map, "moveend", this._handleDragging, this); |
| 361 | + L.DomEvent.on(this._map, "moveend", this._handleDragging, this); // Reset any previously added fullscreen events |
| 362 | + |
| 363 | + L.DomEvent.off(this._map, "enterFullscreen", this._onEnterFullscreen, this); |
| 364 | + L.DomEvent.off(this._map, "exitFullscreen", this._onExitFullscreen, this); |
362 | 365 | L.DomEvent.on(this._map, "enterFullscreen", this._onEnterFullscreen, this);
|
363 | 366 | L.DomEvent.on(this._map, "exitFullscreen", this._onExitFullscreen, this);
|
364 | 367 | L.DomUtil.addClass(this._map._container, "leaflet-gesture-handling");
|
|
382 | 385 | L.DomEvent.off(this._map, "movestart", this._handleDragging, this);
|
383 | 386 | L.DomEvent.off(this._map, "move", this._handleDragging, this);
|
384 | 387 | L.DomEvent.off(this._map, "moveend", this._handleDragging, this);
|
385 |
| - L.DomEvent.off(this._map, "enterFullscreen", this._onEnterFullscreen, this); |
386 |
| - L.DomEvent.off(this._map, "exitFullscreen", this._onExitFullscreen, this); |
387 | 388 | L.DomUtil.removeClass(this._map._container, "leaflet-gesture-handling");
|
388 | 389 | },
|
389 | 390 | _handleDragging: function (e) {
|
|
0 commit comments