summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-03-25 23:14:49 -0400
committerAndras Timar <andras.timar@collabora.com>2020-03-26 17:59:17 +0100
commitf70b9164ee66e8e4ceebf028aac30dc973d3658f (patch)
tree19afb6acae593cc3377a8c34313d46fab1974347
parentaf1dd174b6aba48151bdb9e7286545433a876dad (diff)
leaflet: add margin between sidebar and formula-bar
And remove extra lastActiveTime reset. Change-Id: If7821e07fc61a54dc8caee5983198b475f43098c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91083 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91136 Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/control/Control.LokDialog.js5
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js2
2 files changed, 2 insertions, 5 deletions
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 5d9edd5dc..6057a6d25 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -930,7 +930,6 @@ L.Control.LokDialog = L.Control.extend({
// Move the mouse off-screen when we leave the sidebar
// so we don't leave edge-elements highlighted as if
// the mouse is still over them.
- this._map.lastActiveTime = Date.now();
this._postWindowMouseEvent('move', id, -1, -1, 1, 0, 0);
}, this);
}
@@ -948,8 +947,6 @@ L.Control.LokDialog = L.Control.extend({
}
var pos = this._isSelectionHandle(e.target) ? L.DomEvent.getMousePosition(e, canvas) : {x: e.offsetX, y: e.offsetY};
this._postWindowMouseEvent('move', id, pos.x, pos.y, 1, 0, 0);
- // Keep map active while user is playing with sidebar/dialog.
- this._map.lastActiveTime = Date.now();
}, this);
L.DomEvent.on(canvas, 'mouseleave', function(e) {
@@ -1284,7 +1281,7 @@ L.Control.LokDialog = L.Control.extend({
if (that._currentDeck) {
var sidebar = L.DomUtil.get(that._currentDeck.strId);
if (sidebar) {
- deckOffset = sidebar.clientWidth;
+ deckOffset = sidebar.clientWidth + 10; // Allow some margin.
}
}
var correctWidth = container.clientWidth - deckOffset;
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 4c35db6e4..d512813eb 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1147,7 +1147,6 @@ L.TileLayer = L.GridLayer.extend({
},
_onInvalidateCursorMsg: function (textMsg) {
- var docLayer = this._map._docLayer;
textMsg = textMsg.substring('invalidatecursor:'.length + 1);
var obj = JSON.parse(textMsg);
var modifierViewId = parseInt(obj.viewId);
@@ -1160,6 +1159,7 @@ L.TileLayer = L.GridLayer.extend({
this._twipsToLatLng(topLeftTwips, this._map.getZoom()),
this._twipsToLatLng(bottomRightTwips, this._map.getZoom()));
var cursorPos = this._visibleCursor.getNorthWest();
+ var docLayer = this._map._docLayer;
if ((docLayer._followEditor || docLayer._followUser) && this._map.lastActionByUser) {
this._map._setFollowing(false, null);
}