[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
Henry Castro
hcastro at collabora.com
Wed Apr 6 19:53:47 UTC 2016
loleaflet/dist/leaflet.css | 10 ++++++++
loleaflet/dist/loading.html | 35 +++++++++++++++++++++++++++++
loleaflet/src/map/handler/Map.SlideShow.js | 8 +++++-
3 files changed, 52 insertions(+), 1 deletion(-)
New commits:
commit a06974e2b3e7c8186d2c599576021c927effad6c
Author: Henry Castro <hcastro at collabora.com>
Date: Wed Apr 6 15:23:50 2016 -0400
loleaflet: add loading spinner to slide show
diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index 0fa0e5b..400246f 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -697,3 +697,13 @@ a.leaflet-control-buttons:hover:first-child {
.leaflet-progress-label {
text-align: center;
}
+
+.leaflet-slideshow {
+ background: #FFFFFF;
+ }
+
+.leaflet-slideshow-spinner {
+ background-image: url(images/spinner.gif);
+ background-repeat: no-repeat;
+ background-position: center center;
+ }
diff --git a/loleaflet/dist/loading.html b/loleaflet/dist/loading.html
new file mode 100644
index 0000000..8c5cf1e
--- /dev/null
+++ b/loleaflet/dist/loading.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta charset="utf-8">
+ <style type="text/css">
+ .body {
+ background: #FFFFFF;
+ }
+ .spinner
+ {
+ position: absolute;
+ text-align: center;
+ margin: auto;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ width: 100px;
+ height: 100px;
+ }
+ .spinner img {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="spinner">
+ <img src="/loleaflet/dist/images/spinner.gif">
+ <h4>Loading...</h4>
+ </div>
+ </body>
+</html>
diff --git a/loleaflet/src/map/handler/Map.SlideShow.js b/loleaflet/src/map/handler/Map.SlideShow.js
index 287699f..4b32b97 100644
--- a/loleaflet/src/map/handler/Map.SlideShow.js
+++ b/loleaflet/src/map/handler/Map.SlideShow.js
@@ -22,8 +22,14 @@ L.Map.SlideShow = L.Handler.extend({
this._map.off('slidedownloadready', this._onSlideDownloadReady, this);
},
+ _onIframeLoaded: function (e) {
+ L.DomUtil.removeClass(this._slideShow, 'leaflet-slidshow-spinner');
+ },
+
_onFullScreen: function () {
- this._slideShow = L.DomUtil.create('iframe', '', this._map._container);
+ this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow leaflet-slidshow-spinner', this._map._container);
+ this._slideShow.src = this._map.options.webserver + '/loleaflet/dist/loading.html';
+ this._slideShow.onload = L.bind(this._onIframeLoaded, this);
if (this._slideShow.requestFullscreen) {
this._slideShow.requestFullscreen();
}
More information about the Libreoffice-commits
mailing list