summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-08-06 17:04:00 +0300
committerMihai Varga <mihai.varga@collabora.com>2015-08-06 17:04:00 +0300
commite0dda7b9288e8a592884ad24a4575cbe835894ee (patch)
tree9dc3290178130b130ea483fd48e186ea631aa4db
parent35a1ac1d8616610d923f0cf943f6e1248f481831 (diff)
loleaflet: notify when the document is initialized
-rw-r--r--loleaflet/README4
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js1
2 files changed, 4 insertions, 1 deletions
diff --git a/loleaflet/README b/loleaflet/README
index c2f053199..18577ac25 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -101,9 +101,11 @@ Parts (like slides in presentation, or sheets in spreadsheets):
Statusindicator (when the document is loading):
- events
map.on('statusindicator', function (e) {}) where:
- + e.statusType = 'start' | 'setvalue' | 'finish'
+ + e.statusType = 'start' | 'setvalue' | 'finish' | 'loleafletloaded'
+ e.value == a value from 0 to 100 indicating the status
if the statusType is 'setvalue
+ + 'loleafletloaded' is fired when the JS code is initialized and the document
+ load request is sent and we're waiting for the tiles
Save:
- API:
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 56f0004de..d0c3243da 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -121,6 +121,7 @@ L.TileLayer = L.GridLayer.extend({
if (this.options.readOnly) {
this._map.setPermission('readonly');
}
+ this._map.fire('statusindicator', {statusType: 'loleafletloaded'});
},
getEvents: function () {