leaflet: resolved error in the drop of slide preview

error: Control.PartsPreview.js:633 Uncaught TypeError:
Cannot read property 'maxWidth' of undefined

Change-Id: I618238339187d24312fce4f8eb74f8d331f0d8b4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99613
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
Pranam Lashkari 2020-07-28 17:11:45 +05:30 committed by Andras Timar
parent d8e6b26893
commit 23c51acd49

View file

@ -586,13 +586,6 @@ L.Control.PartsPreview = L.Control.extend({
if (partId < 0) if (partId < 0)
partId = -1; // First item is -1. partId = -1; // First item is -1.
this.partsPreview._map._socket.sendMessage('moveselectedclientparts position=' + partId); 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, this.options.maxWidth, this.options.maxHeight, {autoUpdate: that.options.autoUpdate, broadcast: true});
}
}, 1000);
} }
this.classList.remove('preview-img-dropsite'); this.classList.remove('preview-img-dropsite');