From 6b0fbeda6b61421aaa179e018a1651d326f85736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Thu, 16 Apr 2020 10:42:03 +0200 Subject: [PATCH] Initialize presentation bar only in Impress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I50db46b0117b34cbbb0a95c59e8707be958c62a4 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92336 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- loleaflet/src/control/Control.Toolbar.js | 1 - loleaflet/src/layer/tile/ImpressTileLayer.js | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 428b4c74b..5812d6a0b 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -855,7 +855,6 @@ function initNormalToolbar() { map.addControl(L.control.formulaBar({showfunctionwizard: true})); createSigningBar(); map.addControl(L.control.sheetsBar({shownavigation: true})); - map.addControl(L.control.presentationBar()); } function setupSearchInput() { diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index 886509798..933a89c77 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -60,6 +60,8 @@ L.ImpressTileLayer = L.TileLayer.extend({ L.DomUtil.toBack(container); map.addControl(L.control.partsPreview(container, preview, {fetchThumbnail: false})); L.DomUtil.addClass(mobileWizardContent, 'with-slide-sorter-above'); + } else { + this.onDesktopAndTabletInit(map); } }, @@ -113,6 +115,10 @@ L.ImpressTileLayer = L.TileLayer.extend({ } }, + onDesktopAndTabletInit: function(map) { + map.addControl(L.control.presentationBar()); + }, + onMobileInit: function (map) { map.addControl(L.control.mobileTopBar('presentation'));