[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 26 13:09:46 UTC 2018
loleaflet/src/control/Control.Tabs.js | 2 +-
loleaflet/src/control/Parts.js | 4 ++--
loleaflet/src/layer/tile/TileLayer.js | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 823a4bf88e062a81618b637864cd2de2c79f904c
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Nov 26 13:42:24 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 26 13:47:28 2018 +0200
Fix further fallout from e27ae38bebf4b57aa7563357a188e33d0e1e0be8
One more special case where we do want to do the whileScrolling
callback from the onUpdate callback: When selecting another sheet of a
multi-sheet Calc document. Handle it by adding an optional parameter
to setPart() in Parts.js from _serPart() in Control.Tabs.js, that
eventually gets passed down as the "scroll" parameter to
_onUpdateCursor() in TileLayer.js, which turns on the special
handling.
Change-Id: I44772912a0598b78bef182f1b6147ff91d6c88e9
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 3c6895356..0d7a3a3d5 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -152,7 +152,7 @@ L.Control.Tabs = L.Control.extend({
_setPart: function (e) {
var part = e.target.id.match(/\d+/g)[0];
if (part !== null) {
- this._map.setPart(parseInt(part));
+ this._map.setPart(parseInt(part), /*external:*/ false, /*calledFromSetPartHandler:*/ true);
}
}
});
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index f14a8065f..395f9e092 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -3,7 +3,7 @@
* Document parts switching handler
*/
L.Map.include({
- setPart: function (part, external) {
+ setPart: function (part, external, calledFromSetPartHandler) {
var docLayer = this._docLayer;
docLayer._prevSelectedPart = docLayer._selectedPart;
if (part === 'prev') {
@@ -41,7 +41,7 @@ L.Map.include({
docLayer.eachView(docLayer._cellViewCursors, docLayer._onUpdateCellViewCursor, docLayer);
docLayer.eachView(docLayer._graphicViewMarkers, docLayer._onUpdateGraphicViewSelection, docLayer);
docLayer.eachView(docLayer._viewSelections, docLayer._onUpdateTextViewSelection, docLayer);
- docLayer._clearSelections();
+ docLayer._clearSelections(calledFromSetPartHandler);
docLayer._updateOnChangePart();
docLayer._pruneTiles();
docLayer._prevSelectedPartNeedsUpdate = true;
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index ff078ce15..f543be0f7 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1477,9 +1477,9 @@ L.TileLayer = L.GridLayer.extend({
e.tile.onload = null;
},
- _clearSelections: function () {
+ _clearSelections: function (calledFromSetPartHandler) {
// hide the cursor if not editable
- this._onUpdateCursor();
+ this._onUpdateCursor(calledFromSetPartHandler);
// hide the text selection
this._selections.clearLayers();
// hide the selection handles
More information about the Libreoffice-commits
mailing list