leaflet.fullscreen
Advanced tools
Comparing version 1.4.4 to 1.4.5
{ | ||
"name": "leaflet.fullscreen", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"homepage": "https://github.com/brunob/leaflet.fullscreen", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -49,3 +49,3 @@ (function () { | ||
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault) | ||
.addListener(container, fullScreenApi.fullScreenEventName, this._handleEscKey, context); | ||
.addListener(container, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context); | ||
@@ -55,3 +55,3 @@ L.DomEvent | ||
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault) | ||
.addListener(document, fullScreenApi.fullScreenEventName, this._handleEscKey, context); | ||
.addListener(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context); | ||
@@ -66,7 +66,6 @@ return this.link; | ||
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) { | ||
fullScreenApi.cancelFullScreen(this.options.fullscreenElement ? this.options.fullscreenElement : map._container); | ||
fullScreenApi.cancelFullScreen(); | ||
} else { | ||
L.DomUtil.removeClass(this.options.fullscreenElement ? this.options.fullscreenElement : map._container, 'leaflet-pseudo-fullscreen'); | ||
} | ||
map.invalidateSize(); | ||
map.fire('exitFullscreen'); | ||
@@ -82,3 +81,2 @@ map._exitFired = true; | ||
} | ||
map.invalidateSize(); | ||
map.fire('enterFullscreen'); | ||
@@ -93,5 +91,6 @@ map._isFullscreen = true; | ||
_handleEscKey: function () { | ||
_handleFullscreenChange: function () { | ||
var map = this._map; | ||
if (!fullScreenApi.isFullScreen(map) && !map._exitFired) { | ||
map.invalidateSize(); | ||
if (!fullScreenApi.isFullScreen() && !map._exitFired) { | ||
map.fire('exitFullscreen'); | ||
@@ -98,0 +97,0 @@ map._exitFired = true; |
{ | ||
"name": "leaflet.fullscreen", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.", | ||
@@ -5,0 +5,0 @@ "main": "Control.FullScreen.js", |
@@ -40,2 +40,4 @@ Leaflet.Control.FullScreen | ||
If you want to use the plugin on a map embedded in an iframe, don't forget to set `allowfullscreen` attribute on your iframe. | ||
__Events and options__: | ||
@@ -42,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
14648
74
217