[Libreoffice-commits] online.git: loleaflet/src
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 17 02:43:19 UTC 2019
loleaflet/src/control/Control.PartsPreview.js | 8 ++++++++
loleaflet/src/control/Parts.js | 1 -
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 22d03720a22bd1749fce0c57117c7a36d965d9c0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Nov 28 22:07:33 2018 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sat Aug 17 04:43:00 2019 +0200
leaflet: select the current slide and update previews after reordering
Change-Id: Iec1c41b257744e99d8447518be0b38eb9a28d715
Reviewed-on: https://gerrit.libreoffice.org/69639
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71103
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 854fe21f0..b46d356c6 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -162,6 +162,7 @@ L.Control.PartsPreview = L.Control.extend({
console.log('shift');
} else {
this._map.setPart(partId);
+ this._map.selectPart(partId, 1, false); // And select.
}
}
},
@@ -343,6 +344,13 @@ L.Control.PartsPreview = L.Control.extend({
if (partId < 0)
partId = -1; // First item is -1.
this.partsPreview._map._socket.sendMessage('moveselectedclientparts position=' + partId);
+ // Update previews, after a second, since we only get the dragged one invalidated.
+ var that = this.partsPreview;
+ setTimeout(function () {
+ for (var i = 0; i < that._previewTiles.length; ++i) {
+ that._map.getPreview(i, i, 180, 180, {autoUpdate: that.options.autoUpdate, broadcast: true});
+ }
+ }, 1000);
}
this.classList.remove('preview-img-dropsite');
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index 95e5bc2a0..c428408e7 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -63,7 +63,6 @@ L.Map.include({
// part is the part index/id
// how is 0 to deselect, 1 to select, and 2 to toggle selection
selectPart: function (part, how, external) {
- //TODO: Update/track selected parts(?).
var docLayer = this._docLayer;
var index = docLayer._selectedParts.indexOf(part);
if (index >= 0 && how != 1) {
More information about the Libreoffice-commits
mailing list