diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-08 11:01:03 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-12-08 13:48:05 -0400 |
commit | ca2874e6a33ef72851c268e2a66fa596bc80c456 (patch) | |
tree | df7992a3577eeb7bf3e54aaf6c6eab292d0875a9 | |
parent | Revert "cypress: remove this workaround." (diff) | |
download | online-ca2874e6a33ef72851c268e2a66fa596bc80c456.tar.gz online-ca2874e6a33ef72851c268e2a66fa596bc80c456.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.js | 5 | ||||
-rw-r--r-- | loleaflet/src/layer/tile/TileLayer.js | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/loleaflet/src/control/Control.JSDialog.js b/loleaflet/src/control/Control.JSDialog.js index 95ec2c1947..1eb11fd609 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; @@ -113,4 +114,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 804dafd356..b1336e727c 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++) { |