loleaflet/src/map/handler/Map.SlideShow.js | 42 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-)
New commits: commit ca4fc297545d07ab9ab306925a431194d6be499f Author: Henry Castro <hcas...@collabora.com> AuthorDate: Mon Sep 23 09:49:12 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Dec 3 15:00:27 2019 +0100 loleaflet: android: call a javascript interface, slideshow method NextCloud Android Application is detected with the JavaScript Interface "RichDocumentsMobileInterface" and the slideShow() is called when the full screen slideshow is applied Change-Id: I2559a1cdf452e77147892eddcde21ca472ef632e Reviewed-on: https://gerrit.libreoffice.org/84118 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/src/map/handler/Map.SlideShow.js b/loleaflet/src/map/handler/Map.SlideShow.js index 05a1669c9..4f268df24 100644 --- a/loleaflet/src/map/handler/Map.SlideShow.js +++ b/loleaflet/src/map/handler/Map.SlideShow.js @@ -28,28 +28,34 @@ L.Map.SlideShow = L.Handler.extend({ window.postMobileMessage('SLIDESHOW'); return; } - this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow', this._map._container); - if (this._slideShow.requestFullscreen) { - this._slideShow.requestFullscreen(); - } - else if (this._slideShow.msRequestFullscreen) { - this._slideShow.msRequestFullscreen(); - } - else if (this._slideShow.mozRequestFullScreen) { - this._slideShow.mozRequestFullScreen(); - } - else if (this._slideShow.webkitRequestFullscreen) { - this._slideShow.webkitRequestFullscreen(); - } - L.DomEvent.on(document, 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange', + if (!window.RichDocumentsMobileInterface) { + this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow', this._map._container); + if (this._slideShow.requestFullscreen) { + this._slideShow.requestFullscreen(); + } + else if (this._slideShow.msRequestFullscreen) { + this._slideShow.msRequestFullscreen(); + } + else if (this._slideShow.mozRequestFullScreen) { + this._slideShow.mozRequestFullScreen(); + } + else if (this._slideShow.webkitRequestFullscreen) { + this._slideShow.webkitRequestFullscreen(); + } + + L.DomEvent.on(document, 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange', this._onFullScreenChange, this); + } this.fullscreen = true; this._map.downloadAs('slideshow.svg', 'svg', null, 'slideshow'); }, _onFullScreenChange: function () { + if (window.RichDocumentsMobileInterface) { + return; + } this.fullscreen = document.fullscreen || document.webkitIsFullScreen || @@ -61,8 +67,12 @@ L.Map.SlideShow = L.Handler.extend({ }, _onSlideDownloadReady: function (e) { - this._slideShow.src = e.url; - this._slideShow.contentWindow.focus(); + if (window.RichDocumentsMobileInterface) { + window.RichDocumentsMobileInterface.slideShow(e.url); + } else { + this._slideShow.src = e.url; + this._slideShow.contentWindow.focus(); + } } }); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits