loleaflet/src/control/Control.LokDialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit d8e9a35d74e091a45ed849b2f6ec249b86c71206 Author: Pranav Kant <pran...@collabora.co.uk> Date: Thu Nov 9 15:30:45 2017 +0530 lokdialog: Don't destroy and relaunch when size changed This has an ugly side effect that when size is changed, the dialog is centered in the document. With improvements in core.git, this should work fine now without it. Change-Id: I1bebc8a652cf6887028b6930363ae7ea137efc94 diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index fbfec9ee..d539e246 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -15,7 +15,7 @@ L.Control.LokDialog = L.Control.extend({ _dialogs: {}, _isOpen: function(dialogId) { - return this._dialogs[dialogId]; + return $('#' + dialogId).length > 0; }, _onDialogMsg: function(e) { @@ -197,9 +197,9 @@ L.Control.LokDialog = L.Control.extend({ if (!this._isOpen(dialogId)) { this._launchDialog(dialogId, e.dialogWidth, e.dialogHeight); } else if (!this._isSameSize(dialogId, e.dialogWidth, e.dialogHeight)) { - // size changed - destroy the old sized dialog - this._onDialogClose(dialogId); - this._launchDialog(dialogId, e.dialogWidth, e.dialogHeight); + var canvas = document.getElementById(dialogId + '-canvas'); + canvas.width = e.dialogWidth; + canvas.height = e.dialogHeight; } this._paintDialog(dialogId, e.title, e.rectangle, e.dialog); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits