diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-09-22 13:05:43 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-09-22 20:40:05 +0200 |
commit | 35e1fae9f23f84e78453d1e4a374772306d21d7f (patch) | |
tree | fc0ceb89976bc96a16ddb9aafdcf9ccc1b48b4d7 | |
parent | Ruler: Make sure numbers are always vertically centered (diff) | |
download | online-35e1fae9f23f84e78453d1e4a374772306d21d7f.tar.gz online-35e1fae9f23f84e78453d1e4a374772306d21d7f.zip |
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@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.LokDialog.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index c1abe867fc..2be9330375 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)) { |