rgb: don't break pad styling when updating hue (use correct method to update styles)

This commit is contained in:
jean-emmanuel 2026-02-05 13:28:14 +01:00
parent 3da569700a
commit 09aa7e8a63

View file

@ -217,7 +217,7 @@ export default class Rgb extends Widget {
if (!options.nohue && !options.dragged) {
var hue = hsbToRgb({h:this.hsb.h,s:100,b:100}),
hueStr = `rgb(${Math.round(hue.r)},${Math.round(hue.g)},${Math.round(hue.b)})`
this.pad.container.setAttribute('style',`background-color:${hueStr}`)
this.pad.container.style.setProperty('background-color', hueStr)
this.hue.setValue(this.hsb.h, {sync: false, send:false, dragged:false})
}