From 593ec4c53d99226591e78c13f174347084f42148 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 12 Aug 2026 16:09:43 +0200 Subject: [PATCH] widget: clean not-editable css class --- src/client/ui/ui-colorpicker.mjs | 1 - src/client/widgets/common/widget.mjs | 1 + src/client/widgets/containers/clone.mjs | 4 ---- src/client/widgets/containers/fragment.mjs | 4 ---- src/client/widgets/pads/rgb.mjs | 3 --- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/client/ui/ui-colorpicker.mjs b/src/client/ui/ui-colorpicker.mjs index 54d625a5..8e39ea55 100644 --- a/src/client/ui/ui-colorpicker.mjs +++ b/src/client/ui/ui-colorpicker.mjs @@ -23,7 +23,6 @@ class ColorPicker extends UiWidget { snap: true, alpha: true }, parent: this}) - this.rgb.container.classList.add('not-editable') this.container = html`
diff --git a/src/client/widgets/common/widget.mjs b/src/client/widgets/common/widget.mjs index 7e6f9491..5c1c2693 100644 --- a/src/client/widgets/common/widget.mjs +++ b/src/client/widgets/common/widget.mjs @@ -1180,6 +1180,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) } diff --git a/src/client/widgets/containers/clone.mjs b/src/client/widgets/containers/clone.mjs index 9eed0102..7c20cebf 100644 --- a/src/client/widgets/containers/clone.mjs +++ b/src/client/widgets/containers/clone.mjs @@ -282,10 +282,6 @@ class Clone extends Container() { this.container.classList.remove('empty') - for (var w of this.getAllChildren()) { - w.container.classList.add('not-editable') - } - if (checkResize) resize.check(this.widget) } else if (this.cloneClass.length) { diff --git a/src/client/widgets/containers/fragment.mjs b/src/client/widgets/containers/fragment.mjs index 0b7ddc2b..7bbd9b32 100644 --- a/src/client/widgets/containers/fragment.mjs +++ b/src/client/widgets/containers/fragment.mjs @@ -138,10 +138,6 @@ class Fragment extends Container() { this.container.classList.remove('empty') - for (var w of this.getAllChildren()) { - w.container.classList.add('not-editable') - } - if (checkResize) resize.check(this.widget) } else if (this.fragmentClass.length) { diff --git a/src/client/widgets/pads/rgb.mjs b/src/client/widgets/pads/rgb.mjs index 734d4511..b5a2f483 100644 --- a/src/client/widgets/pads/rgb.mjs +++ b/src/client/widgets/pads/rgb.mjs @@ -59,7 +59,6 @@ export default class Rgb extends Widget { pips: false, }, parent: this}) this.pad.sendValue = ()=>{} - this.pad.container.classList.add('not-editable', 'pad') this.widget.appendChild(this.pad.container) this.pad.on('value-changed',(e)=>{ e.stopPropagation = true @@ -77,7 +76,6 @@ export default class Rgb extends Widget { range:{min:0,max:360}, decimals:2 }, parent: this}) - this.hue.container.classList.add('not-editable', 'hue') this.widget.appendChild(this.hue.container) this.hue.on('value-changed',(e)=>{ e.stopPropagation = true @@ -98,7 +96,6 @@ export default class Rgb extends Widget { input:false, decimals:2 }, parent: this}) - this.alpha.container.classList.add('not-editable', 'alpha') this.widget.appendChild(this.alpha.container) this.alpha.on('value-changed',(e)=>{ e.stopPropagation = true