diff options
author | Aron Budea <aron.budea@collabora.com> | 2020-03-23 03:12:24 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-03-26 13:15:03 +0100 |
commit | 8686b092d579df18ce9f16fe28afd028ca220eea (patch) | |
tree | 40a52c26bd3b7056546e639c5dd81461986f3750 | |
parent | 6f79be196c74ce33667b3c05c84a7d2a3b16c3f8 (diff) |
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@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.PartsPreview.js | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |