From 8381ca75315ac4634099fe20b34e2d08d953f1cd Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 16 Nov 2020 18:47:44 +0100 Subject: [PATCH] root: missing vertical scrollbar when root's height overflows the workspace --- CHANGELOG.md | 1 + src/client/widgets/containers/root.js | 9 +++++++++ src/scss/widgets/containers.scss | 12 +++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 676a1e3a..ee5a9f5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ As of this version, packages except the `node` package are bundled with a midi b - osc listeners not resolving "auto" address - `ELECTRON_RUN_AS_NODE` headless mode not working without `--no-gui` option - ios: clone widget not laid out properly in horizontal panels + - missing vertical scrollbar when root's height overflows the workspace - ui - add console bottom panel with a simple script interpreter diff --git a/src/client/widgets/containers/root.js b/src/client/widgets/containers/root.js index 83fd4700..875d54cf 100644 --- a/src/client/widgets/containers/root.js +++ b/src/client/widgets/containers/root.js @@ -54,6 +54,15 @@ class Root extends StaticProperties(Panel, {visible: true, label: false, id: 'ro } + setContainerStyles(styles) { + + super.setContainerStyles(styles) + + this.container.classList.toggle('auto-height', this.getProp('height') === 'auto') + + } + + } diff --git a/src/scss/widgets/containers.scss b/src/scss/widgets/containers.scss index b128ced1..e4858646 100644 --- a/src/scss/widgets/containers.scss +++ b/src/scss/widgets/containers.scss @@ -211,11 +211,13 @@ height: 100%; // optimize layout recalc - position: absolute; - top:0; - left:0; - right:0; - bottom:0; + &.auto-height { + position: absolute; + top:0; + left:0; + right:0; + bottom:0; + } > inner { margin: var(--widget-spacing);