loleaflet/css/partsPreviewControl.css         |    4 ++--
 loleaflet/src/control/Control.PartsPreview.js |   23 ++++++++++++++++++++++-
 loleaflet/src/control/Parts.js                |    7 +++++++
 3 files changed, 31 insertions(+), 3 deletions(-)

New commits:
commit 7cb031a759c56360c1d99688a2ddcaa0d932a768
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Sun May 24 15:57:44 2020 +0530
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Jun 10 12:34:07 2020 +0200

    leaflet: select rang of slides using shift key in slide sorter
    
    Change-Id: I70f76d12a9229cc11594407f510e280d86dea8c3
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94754
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index 045b9b01f..c7250de7f 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -309,13 +309,34 @@ L.Control.PartsPreview = L.Control.extend({
 
                        if (e.ctrlKey) {
                                this._map.selectPart(partId, 2, false); // 
Toggle selection on ctrl+click.
+                               if (this.firstSelection === undefined)
+                                       this.firstSelection = 
this._map._docLayer._selectedPart;
                        } else if (e.altKey) {
                                console.log('alt');
                        } else if (e.shiftKey) {
-                               console.log('shift');
+                               if (this.firstSelection === undefined)
+                                       this.firstSelection = 
this._map._docLayer._selectedPart;
+
+                               //deselect all slide
+                               this._map.deselectAll();
+
+                               //reselect the first origianl selection
+                               this._map.setPart(this.firstSelection);
+                               this._map.selectPart(this.firstSelection, 1, 
false);
+
+                               if (this.firstSelection < partId) {
+                                       for (var id = this.firstSelection + 1; 
id <= partId; ++id) {
+                                               this._map.selectPart(id, 2, 
false);
+                                       }
+                               } else if (this.firstSelection > partId) {
+                                       for (id = this.firstSelection - 1; id 
>= partId; --id) {
+                                               this._map.selectPart(id, 2, 
false);
+                                       }
+                               }
                        } else {
                                this._map.setPart(partId);
                                this._map.selectPart(partId, 1, false); // And 
select.
+                               this.firstSelection = partId;
                        }
                }
        },
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index 4c3ff9cec..72a213402 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -90,6 +90,13 @@ L.Map.include({
                }
        },
 
+       deselectAll: function() {
+               var docLayer = this._docLayer;
+               while (docLayer._selectedParts.length > 0) {
+                       this.selectPart(docLayer._selectedParts[0], 0, false);
+               }
+       },
+
        getPreview: function (id, index, maxWidth, maxHeight, options) {
                if (!this._docPreviews) {
                        this._docPreviews = {};
commit 9994a5f0e5f479c2d10245a11094e4052e952259
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Thu May 21 00:05:57 2020 +0530
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Jun 10 12:33:58 2020 +0200

    leaflet: make slide selected border visible
    
    Change-Id: I5778dd2b212eeaf9789219201cb60630859749d3
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94595
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/loleaflet/css/partsPreviewControl.css 
b/loleaflet/css/partsPreviewControl.css
index 0d07b3d0c..46666d85a 100644
--- a/loleaflet/css/partsPreviewControl.css
+++ b/loleaflet/css/partsPreviewControl.css
@@ -41,8 +41,8 @@
 
 /* One of (potentially many) selected parts, but not the current. */
 .preview-img-selectedpart {
-    border-color: #000000;
-    border-style: dotted;
+    border-color: #0b87e780 !important;
+    border-style: solid;
 }
 
 /* Highlight where a slide can be dropped when reordering by drag-and-drop. */
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to