summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-03-25 20:19:09 +0100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-09-03 01:53:12 -0400
commit652ae5c68f7d494293bc486ecae56c30f2f971c8 (patch)
treeadde921cfafd5c348667042ba2ee21f7147ae8cb
parentd5b906f3d5294414227669d586baed5c8a6159f2 (diff)
Sidebar: don't show border and placeholder if not visible
Change-Id: I689fa47b0dcb034688ec73c0d338c99423b10a38 (cherry picked from commit 9b31ab7d44894dda87276eae6bb852bbbc692e1e)
-rw-r--r--loleaflet/css/loleaflet.css1
-rw-r--r--loleaflet/src/control/Control.LokDialog.js7
2 files changed, 7 insertions, 1 deletions
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 0cf5e2b0c..1941b78d5 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -117,6 +117,7 @@ body {
}
#sidebar-dock-wrapper {
+ display: none;
background: #fff;
position: absolute;
top: 77px;
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 9d3721f78..3552d4f0b 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -512,6 +512,8 @@ L.Control.LokDialog = L.Control.extend({
&& this._map._permission != 'edit')
return;
+ $('#sidebar-dock-wrapper').css('display', 'block');
+
var ratio = 1.0;
if (width > window.screen.width) {
ratio = window.screen.width / width;
@@ -890,7 +892,10 @@ L.Control.LokDialog = L.Control.extend({
_resizeSidebar: function(strId, width) {
this._currentDeck.width = width;
- width = width + 15;
+ if (width > 1) {
+ // Add extra space for scrollbar only when visible
+ width = width + 15;
+ }
var sidebar = L.DomUtil.get(strId);
if (sidebar) {
sidebar.width = width;