Add allowfullscreen attribute to the iframe; fix fullscreen icon

when active in touch screen

fix #516
This commit is contained in:
Yohan Boniface 2018-07-07 16:52:32 +02:00
parent 1a815b313d
commit aaaa339e9c
2 changed files with 2 additions and 1 deletions

View file

@ -1055,7 +1055,7 @@ L.U.IframeExporter = L.Class.extend({
}
var currentView = this.options.currentView ? window.location.hash : '',
iframeUrl = this.baseUrl + '?' + this.map.xhr.buildQueryString(this.queryString) + currentView,
code = '<iframe width="' + this.dimensions.width + '" height="' + this.dimensions.height + '" frameBorder="0" src="' + iframeUrl + '"></iframe>';
code = '<iframe width="' + this.dimensions.width + '" height="' + this.dimensions.height + '" frameBorder="0" allowfullscreen src="' + iframeUrl + '"></iframe>';
if (this.options.includeFullScreenLink) {
code += '<p><a href="' + this.baseUrl + '">' + L._('See full screen') + '</a></p>';
}

View file

@ -33,6 +33,7 @@
width: 36px;
background-position: 0px 0px;
}
.leaflet-touch.leaflet-fullscreen-on .leaflet-control-fullscreen a,
.leaflet-fullscreen-on .leaflet-control-fullscreen a {
background-position: 0 -32px;
}