root: missing scroll property
scrollbar: error when transparent
This commit is contained in:
parent
a0882e655c
commit
b63b3ebac7
2 changed files with 12 additions and 3 deletions
|
|
@ -5,9 +5,17 @@ module.exports = (container)=>{
|
|||
setTimeout(()=>{
|
||||
|
||||
var computedStyle = window.getComputedStyle(container),
|
||||
color = computedStyle.getPropertyValue('--color-fill').trim(),
|
||||
alpha = parseFloat(computedStyle.getPropertyValue('--alpha-scrollbar')),
|
||||
alphaOn = parseFloat(computedStyle.getPropertyValue('--alpha-scrollbar-on'))
|
||||
alphaOn = parseFloat(computedStyle.getPropertyValue('--alpha-scrollbar-on')),
|
||||
color = computedStyle.getPropertyValue('--color-fill').trim()
|
||||
|
||||
if (color === 'transparent') {
|
||||
// prevent chroma-js error
|
||||
// irrelevant case, but still...
|
||||
color = 'rgb(0, 0, 0)'
|
||||
alpha = 0
|
||||
alphaOn = 0
|
||||
}
|
||||
|
||||
if (color) {
|
||||
container.style.setProperty('--color-scrollbar', chroma(color).alpha(alpha).css())
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ var Panel = require('./panel'),
|
|||
html = require('nanohtml'),
|
||||
raw = require('nanohtml/raw')
|
||||
|
||||
class Root extends StaticProperties(Panel, {scroll: false, visible: true, label: false, id: 'root'}) {
|
||||
class Root extends StaticProperties(Panel, {visible: true, label: false, id: 'root'}) {
|
||||
|
||||
static description() {
|
||||
|
||||
|
|
@ -26,6 +26,7 @@ class Root extends StaticProperties(Panel, {scroll: false, visible: true, label:
|
|||
gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns of a value css grid-template definition.'},
|
||||
verticalTabs: {type: 'boolean', value: false, help: 'Set to `true` to display for vertical tab layout'},
|
||||
traversing: {type: 'boolean', value: false, help: 'Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget'},
|
||||
scroll: {type: 'boolean', value: true, help: 'Set to `false` to disable scrollbars'},
|
||||
variables: {type: '*', value: '', help: 'Defines one or more arbitrary variables that can be inherited by children widgets'},
|
||||
|
||||
}, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue