[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - 2 commits - loleaflet/css loleaflet/src
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 18 20:30:21 UTC 2019
loleaflet/css/partsPreviewControl.css | 2 +-
loleaflet/src/control/Control.PartsPreview.js | 11 ++++++++++-
loleaflet/src/control/Parts.js | 1 -
3 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit f2f42f82c670b41ceebec9ccb97a3dde9d1e3296
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Nov 28 22:07:33 2018 -0500
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Oct 18 22:30:18 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>
(cherry picked from commit 4e30d3d2a3dacfad34168e17a194e7bf78e725a2)
Reviewed-on: https://gerrit.libreoffice.org/80582
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 908d7e5ca..92bbd2673 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -211,6 +211,7 @@ L.Control.PartsPreview = L.Control.extend({
console.log('shift');
} else {
this._map.setPart(partId);
+ this._map.selectPart(partId, 1, false); // And select.
}
}
},
@@ -392,6 +393,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) {
commit 1aa2734eaee8f9e219a54f7ba41978ac6b9c6e55
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Fri Nov 23 01:50:30 2018 -0500
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Oct 18 22:30:03 2019 +0200
leaflet: make the slide drop sites more visible
Change-Id: Idc8e2ee33fc61449300180e8200f5aa75b82f07e
Reviewed-on: https://gerrit.libreoffice.org/69638
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit f5cdff4d7eec25a76f7776210beb929095ea81ae)
Reviewed-on: https://gerrit.libreoffice.org/80581
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/css/partsPreviewControl.css b/loleaflet/css/partsPreviewControl.css
index 39bba0121..e5afa218a 100644
--- a/loleaflet/css/partsPreviewControl.css
+++ b/loleaflet/css/partsPreviewControl.css
@@ -41,5 +41,5 @@
/* Highlight where a slide can be dropped when reordering by drag-and-drop. */
.preview-img-dropsite {
- border-bottom: 2px solid red;
+ border-bottom: 3px solid red;
}
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 1492f03ab..908d7e5ca 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -86,7 +86,8 @@ L.Control.PartsPreview = L.Control.extend({
var frame = L.DomUtil.create('div', 'preview-frame', this._scrollContainer);
this._addDnDHandlers(frame);
frame.setAttribute('draggable', false);
- L.DomUtil.setStyle(frame, 'height', '12px');
+ L.DomUtil.setStyle(frame, 'height', '20px');
+ L.DomUtil.setStyle(frame, 'margin', '0em');
// Create the preview parts
for (var i = 0; i < parts; i++) {
More information about the Libreoffice-commits
mailing list