diff --git a/src/client/ui/ui-colorpicker.mjs b/src/client/ui/ui-colorpicker.mjs index 8e39ea55..2b6df433 100644 --- a/src/client/ui/ui-colorpicker.mjs +++ b/src/client/ui/ui-colorpicker.mjs @@ -22,7 +22,7 @@ class ColorPicker extends UiWidget { alphaStroke: 0, snap: true, alpha: true - }, parent: this}) + }, parent: this, meta: {not_editable: true}}) this.container = html`
diff --git a/src/client/widgets/common/widget.mjs b/src/client/widgets/common/widget.mjs index 05036ae6..24005fce 100644 --- a/src/client/widgets/common/widget.mjs +++ b/src/client/widgets/common/widget.mjs @@ -1234,7 +1234,7 @@ class Widget extends EventEmitter { } this.container.classList.toggle('absolute-position', absolutePos) this.container.classList.toggle('flex-expand', this.getProp('expand')) - this.container.classList.toggle('not-editable', this.meta.not_editable) + this.container.classList.toggle('not-editable', !!this.meta.not_editable) } diff --git a/src/client/widgets/pads/rgb.mjs b/src/client/widgets/pads/rgb.mjs index b5a2f483..4db285b4 100644 --- a/src/client/widgets/pads/rgb.mjs +++ b/src/client/widgets/pads/rgb.mjs @@ -57,8 +57,9 @@ export default class Rgb extends Widget { decimals:2, pointSize: 10, pips: false, - }, parent: this}) + }, parent: this, meta: {not_editable: true}}) this.pad.sendValue = ()=>{} + this.pad.container.classList.add('pad') this.widget.appendChild(this.pad.container) this.pad.on('value-changed',(e)=>{ e.stopPropagation = true @@ -75,7 +76,8 @@ export default class Rgb extends Widget { snap:this.getProp('snap'), range:{min:0,max:360}, decimals:2 - }, parent: this}) + }, parent: this, meta: {not_editable: true}}) + this.hue.container.classList.add('hue') this.widget.appendChild(this.hue.container) this.hue.on('value-changed',(e)=>{ e.stopPropagation = true @@ -95,7 +97,8 @@ export default class Rgb extends Widget { default: 255, input:false, decimals:2 - }, parent: this}) + }, parent: this, meta: {not_editable: true}}) + this.alpha.container.classList.add('alpha') this.widget.appendChild(this.alpha.container) this.alpha.on('value-changed',(e)=>{ e.stopPropagation = true