loleaflet/src/control/Control.PartsPreview.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit e82878d45b96d478ecdf6547fae42fe3a6dd7f26 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Mon Mar 23 03:12:24 2020 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Thu Mar 26 11:59:34 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/+/90898 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 3e31133e7..dd426b186 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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits