loleaflet/src/control/Control.StatusBar.js | 7 +++++++ loleaflet/src/control/Control.TopToolbar.js | 7 +++++++ loleaflet/src/control/Control.UIManager.js | 15 --------------- 3 files changed, 14 insertions(+), 15 deletions(-)
New commits: commit 829a0c7fa3d7a4168d67e3b7bd439c62b39e5d2e Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Apr 22 09:28:11 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Wed Apr 22 10:20:15 2020 +0200 Move toolbars resizing to the internal implementation Change-Id: I7afa916f03c4d6d4dd4b863d6ff65b1936fe32f0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92671 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 2f1a7a44f..056975769 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -15,6 +15,13 @@ L.Control.StatusBar = L.Control.extend({ map.on('commandvalues', this.onCommandValues, this); map.on('commandstatechanged', this.onCommandStateChanged, this); this.create(); + + $(window).resize(function() { + if ($(window).width() !== map.getSize().x) { + var statusbar = w2ui['actionbar']; + statusbar.resize(); + } + }); }, hideTooltip: function(toolbar, id) { diff --git a/loleaflet/src/control/Control.TopToolbar.js b/loleaflet/src/control/Control.TopToolbar.js index bb13a1fb4..06fdd038f 100644 --- a/loleaflet/src/control/Control.TopToolbar.js +++ b/loleaflet/src/control/Control.TopToolbar.js @@ -22,6 +22,13 @@ L.Control.TopToolbar = L.Control.extend({ if (!window.mode.isMobile()) { map.on('updatetoolbarcommandvalues', this.updateCommandValues, this); } + + $(window).resize(function() { + if ($(window).width() !== map.getSize().x) { + var toolbar = w2ui['editbar']; + toolbar.resize(); + } + }); }, onFontSizeSelect: function(e) { diff --git a/loleaflet/src/control/Control.UIManager.js b/loleaflet/src/control/Control.UIManager.js index f3cad662e..88124c491 100644 --- a/loleaflet/src/control/Control.UIManager.js +++ b/loleaflet/src/control/Control.UIManager.js @@ -15,8 +15,6 @@ L.Control.UIManager = L.Control.extend({ // UI initialization initializeBasicUI: function() { - var that = this; - var menubar = L.control.menubar(); this.map.menubar = menubar; this.map.addControl(menubar); @@ -54,10 +52,6 @@ L.Control.UIManager = L.Control.extend({ w2utils.unlock(w2ui['actionbar'].box); } }); - - $(window).resize(function() { - that.resizeToolbars(); - }); }, initializeSpecializedUI: function(docType) { @@ -173,15 +167,6 @@ L.Control.UIManager = L.Control.extend({ this.map.invalidateSize(); }, - resizeToolbars: function() { - if ($(window).width() !== this.map.getSize().x) { - var toolbarUp = w2ui['editbar']; - var statusbar = w2ui['actionbar']; - toolbarUp.resize(); - statusbar.resize(); - } - }, - // Helper functions moveObjectVertically: function(obj, diff) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits