[Libreoffice-commits] online.git: loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 13 09:18:39 UTC 2020
loleaflet/src/control/Control.LokDialog.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 35534b7d63d3072862cf02b7a9b910a8ff3e75e0
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Aug 13 10:52:49 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Aug 13 11:18:20 2020 +0200
Handle calc-input-win position changes
When notebookbar is created calc-input-win is moved down.
This change takes into account that change and allows
us to handle click position correctly.
Change-Id: I7dd6f3ec7d65cd293721321b080626c61a84daf7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100649
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 9e9a1fe4d..3332c53ed 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -380,8 +380,8 @@ L.Control.LokDialog = L.Control.extend({
this._launchSidebar(e.id, width, height);
} else if (e.winType === 'calc-input-win' || this.isCalcInputBar(e.id)) {
lines = parseInt(e.lines);
- left = left | this._calcInputBar.left;
- top = top | this._calcInputBar.top;
+ left = left || this._calcInputBar.left;
+ top = top || this._calcInputBar.top;
this._launchCalcInputBar(e.id, left, top, width, height, lines);
}
else {
@@ -839,8 +839,10 @@ L.Control.LokDialog = L.Control.extend({
_adjustCalcInputBar: function(id, left, top, width, height, textLines) {
if (this._calcInputBar) {
var oldHeight = this._calcInputBar.height;
+ var oldX = this._calcInputBar.left;
+ var oldY = this._calcInputBar.top;
var delta = height - oldHeight;
- if (delta !== 0) {
+ if (delta !== 0 || oldX !== left || oldY !== top) {
console.log('_adjustCalcInputBar: start: id: ' + id + ', height: ' + oldHeight + ' -> ' + height);
// Recreate the input-bar.
More information about the Libreoffice-commits
mailing list