containers: prevent errors with some color formats in colorWidget

This commit is contained in:
jean-emmanuel 2021-10-25 08:42:04 +02:00
parent 509fcb7f2f
commit c97372739c
2 changed files with 5 additions and 2 deletions

View file

@ -5,6 +5,7 @@
- bug fixes
- menu: interaction issue on iOS
- script: prevent script functions from being called in the wrong scope (ie when leaked using the `globals` object) and print an explicit error
- containers: prevent errors with some color formats in colorWidget
- widgets
- when a panel contains widgets and has `scroll` set to `true`, its value will be used to represent the scroll position for x-axis and y-axis between 0 and 1.

View file

@ -18,8 +18,10 @@ module.exports = (container)=>{
}
if (color) {
container.style.setProperty('--color-scrollbar', chroma(color).alpha(alpha).css())
container.style.setProperty('--color-scrollbar-on', chroma(color).alpha(alphaOn).css())
try {
container.style.setProperty('--color-scrollbar', chroma(color).alpha(alpha).css())
container.style.setProperty('--color-scrollbar-on', chroma(color).alpha(alphaOn).css())
} catch(e) {}
}
})