[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - loleaflet/src

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 26 12:15:21 UTC 2020


 loleaflet/src/control/Control.PartsPreview.js |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8686b092d579df18ce9f16fe28afd028ca220eea
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Mon Mar 23 03:12:24 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 26 13:15:03 2020 +0100

    loleaflet: Reordering slide always moved it to the beginning
    
    Get partsPreview._partsPreviewCont correctly.
    
    Regression since 74adf2f61a52f9c13aa1f76ae816143c5038c514.
    
    Also get partsPreview.options correctly.
    
    Change-Id: I04488663d69a8677414d8b5250bff771114f58ed
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91110
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-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 3ed9f09d4..6a40e9d02 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -450,7 +450,7 @@ L.Control.PartsPreview = L.Control.extend({
 	_handleDragStart: function (e) {
 		// To avoid having to add a new message to move an arbitrary part, let's select the
 		// slide that is being dragged.
-		var part = $(this._partsPreviewCont).find('.mCSB_container .preview-frame').index(e.target.parentNode);
+		var part = $(this.partsPreview._partsPreviewCont).find('.mCSB_container .preview-frame').index(e.target.parentNode);
 		if (part !== null) {
 			var partId = parseInt(part) - 1; // The first part is just a drop-site for reordering.
 			this.partsPreview._map.setPart(partId);
@@ -486,7 +486,7 @@ L.Control.PartsPreview = L.Control.extend({
 			e.stopPropagation();
 		}
 
-		var part = $(this._partsPreviewCont).find('.mCSB_container .preview-frame').index(e.target.parentNode);
+		var part = $(this.partsPreview._partsPreviewCont).find('.mCSB_container .preview-frame').index(e.target.parentNode);
 		if (part !== null) {
 			var partId = parseInt(part) - 1; // First frame is a drop-site for reordering.
 			if (partId < 0)
@@ -496,7 +496,7 @@ L.Control.PartsPreview = L.Control.extend({
 			var that = this.partsPreview;
 			setTimeout(function () {
 				for (var i = 0; i < that._previewTiles.length; ++i) {
-					that._map.getPreview(i, this.options.maxWidth, this.options.maxHeight, {autoUpdate: that.options.autoUpdate, broadcast: true});
+					that._map.getPreview(i, that.options.maxWidth, that.options.maxHeight, {autoUpdate: that.options.autoUpdate, broadcast: true});
 				}
 			}, 1000);
 		}


More information about the Libreoffice-commits mailing list