[Libreoffice-commits] online.git: loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 22 18:40:24 UTC 2020


 loleaflet/src/control/Control.LokDialog.js |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 35e1fae9f23f84e78453d1e4a374772306d21d7f
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Sep 22 13:05:43 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Sep 22 20:40:05 2020 +0200

    Resize tunneled tooltips on invalidation
    
    Prevent us from showing leftovers from previous (longer) tooltip.
    
    Change-Id: Ic35238c6a9780c975f90ee76b1c12b92065b4f1b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103185
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index c1abe867f..2be933037 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -373,6 +373,17 @@ L.Control.LokDialog = L.Control.extend({
 			var parent = this._getParentId(e.id);
 			var rectangle = e.rectangle;
 			if (parent) { // this is a floating window
+				if (e.rectangle && this._dialogs[parent].childistooltip === true) {
+					// resize tooltips on invalidation
+					left = this._dialogs[parent].childx;
+					top = this._dialogs[parent].childy;
+					width = parseInt(e.rectangle.split(',')[2]);
+					height = parseInt(e.rectangle.split(',')[3]);
+					this._dialogs[parent].childwidth = width;
+					this._dialogs[parent].childheight = height;
+					this._createDialogChild(e.id, parent, top, left);
+				}
+
 				rectangle = this._createRectStr(null, 0, 0, this._dialogs[parent].childwidth, this._dialogs[parent].childheight);
 			} else if (rectangle) { // this is the actual dialog
 				if (this._isRectangleValid(rectangle)) {


More information about the Libreoffice-commits mailing list