summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-08 11:01:03 -0400
committerJan Holesovsky <holesovsky@gmail.com>2021-01-21 14:55:44 +0100
commit3b955078c9c1f8ddea691f9d8a335f791024c8fe (patch)
treed30e58b0c81716107d921ba49f6c52be8cd2a67f
parentmobilewizard: warn children data type check (diff)
downloadonline-3b955078c9c1f8ddea691f9d8a335f791024c8fe.tar.gz
online-3b955078c9c1f8ddea691f9d8a335f791024c8fe.zip
jsdialog: fix the type dialog
Unfortunately when firifing the event "jsdialog" this._map.fire('jsdialog', msgData); the data type is replaced with the event type Change-Id: Ib7ceb96c5fad82dc2d9db61d8399d7fa858c7044 Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--loleaflet/src/control/Control.JSDialog.js5
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/loleaflet/src/control/Control.JSDialog.js b/loleaflet/src/control/Control.JSDialog.js
index d872c2e5a1..5c5d88f286 100644
--- a/loleaflet/src/control/Control.JSDialog.js
+++ b/loleaflet/src/control/Control.JSDialog.js
@@ -18,9 +18,10 @@ L.Control.JSDialog = L.Control.extend({
this.map.off('jsdialog', this.onJSDialog, this);
},
- onJSDialog: function(data) {
+ onJSDialog: function(e) {
var posX = 0;
var posY = 0;
+ var data = e.data;
if (this.dialogs[data.id]) {
posX = this.dialogs[data.id].startX;
@@ -120,4 +121,4 @@ L.Control.JSDialog = L.Control.extend({
L.control.jsDialog = function (options) {
return new L.Control.JSDialog(options);
-}; \ No newline at end of file
+};
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 60b531ae48..39ded06a40 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1063,7 +1063,7 @@ L.TileLayer = L.GridLayer.extend({
if (msgData.jsontype === 'autofilter') {
this._map.fire('autofilterdropdown', msgData);
} else if (msgData.jsontype === 'dialog') {
- this._map.fire('jsdialog', msgData);
+ this._map.fire('jsdialog', {data: msgData});
} else if (msgData.jsontype === 'notebookbar' || msgData.type === 'borderwindow') {
window.notebookbarId = msgData.id;
for (var i = 0; i < msgData.children.length; i++) {