loleaflet/src/control/Control.PartsPreview.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 069c95e9e5ebb9f716aa38abc9adc10910d73484 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jan 10 14:03:57 2020 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Mon Jan 13 13:13:33 2020 +0100 loleaflet: mobile: trigger the mobile wizard on .. long press event in thumbnail previews in Impress Change-Id: Ib0661b906882b87d68833c96ce3f535bd3fccbec Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86568 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 212eb25b5..abaf996ec 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -3,7 +3,7 @@ * L.Control.PartsPreview */ -/* global $ */ +/* global $ Hammer w2ui */ L.Control.PartsPreview = L.Control.extend({ options: { fetchThumbnail: true, @@ -163,6 +163,16 @@ L.Control.PartsPreview = L.Control.extend({ img.hash = hashCode; img.src = L.Icon.Default.imagePath + '/preview_placeholder.png'; img.fetched = false; + if (L.Browser.mobile) { + (new Hammer(img, {recognizers: [[Hammer.Press]]})) + .on('press', L.bind(function () { + if (this._map._permission === 'edit') { + setTimeout(function () { + w2ui['actionbar'].click('mobile_wizard'); + }, 0); + } + }, this)); + } L.DomEvent.on(img, 'click', function (e) { L.DomEvent.stopPropagation(e); L.DomEvent.stop(e); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits