From 5ac89601d63bbb4346cb208a38f73e0435dd3513 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Tue, 3 Nov 2020 12:44:38 +0800 Subject: [PATCH] hide toolBar when hiding statusBar --- libs/control.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/control.js b/libs/control.js index 1a6258b0..a3ab2cb4 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2746,6 +2746,7 @@ control.prototype.showStatusBar = function () { statusItems[i].style.opacity = 1; this.setToolbarButton(false); core.dom.tools.hard.style.display = 'block'; + core.dom.toolBar.style.display = 'block'; } control.prototype.hideStatusBar = function (showToolbox) { @@ -2767,6 +2768,9 @@ control.prototype.hideStatusBar = function (showToolbox) { for (var i = 0; i < toolItems.length; ++i) toolItems[i].style.display = 'none'; } + if (!core.domStyle.isVertical) { + core.dom.toolBar.style.display = 'none'; + } } ////// 更新状态栏的勇士图标 ////// @@ -3099,10 +3103,15 @@ control.prototype._resize_toolBar = function (obj) { toolBar.style.height = 0.281 * obj.outerSize + "px"; toolBar.style.background = 'transparent'; } - toolBar.style.display = 'block'; toolBar.style.borderLeft = obj.border; toolBar.style.borderRight = toolBar.style.borderBottom = core.domStyle.isVertical ? obj.border : ''; toolBar.style.fontSize = 16 * core.domStyle.scale + "px"; + + if (!core.domStyle.showStatusBar && !core.domStyle.isVertical) { + toolBar.style.display = 'none'; + } else { + toolBar.style.display = 'block'; + } } control.prototype._resize_tools = function (obj) {