loleaflet: optimize slideshow spinner
This commit fixes 2 issues: - a UX issue described by tdf#124544 (slideshow spinner is not displayed for the correct duration - user shown a blank screen while the browser downloads slideshow.svg) - an additional HTTP request is being made to loading.html just to display an ordinary spinner (that can be otherwise loaded via css for example) tdf#124544 Change-Id: I90d1e73d1514d736dd58a53caa5921b42bc1bd75 Reviewed-on: https://gerrit.libreoffice.org/70250 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
parent
f031e95229
commit
51e849bf5d
3 changed files with 4 additions and 2 deletions
|
@ -63,6 +63,7 @@ LOLEAFLET_CSS =\
|
|||
$(builddir)/node_modules/select2/dist/css/select2.css \
|
||||
$(srcdir)/css/w2ui-1.5.rc1.css \
|
||||
$(srcdir)/css/leaflet.css \
|
||||
$(srcdir)/css/leaflet-spinner.css \
|
||||
$(srcdir)/css/selectionMarkers.css \
|
||||
$(srcdir)/css/loleaflet.css \
|
||||
$(srcdir)/css/toolbar.css \
|
||||
|
|
3
loleaflet/css/leaflet-spinner.css
Normal file
3
loleaflet/css/leaflet-spinner.css
Normal file
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,6 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
return;
|
||||
}
|
||||
this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow', this._map._container);
|
||||
this._slideShow.src = this._map.options.webserver + this._map.options.serviceRoot + '/loleaflet/dist/loading.html';
|
||||
if (this._slideShow.requestFullscreen) {
|
||||
this._slideShow.requestFullscreen();
|
||||
}
|
||||
|
@ -64,7 +63,6 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
_onSlideDownloadReady: function (e) {
|
||||
this._slideShow.src = e.url;
|
||||
this._slideShow.contentWindow.focus();
|
||||
clearInterval(this._slideShow.contentWindow.spinnerInterval);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue