led: set max --opacity when mode == "color" (#624)

This commit is contained in:
bordun 2020-05-14 15:32:37 +02:00
parent 35e9b5dfef
commit 94ac9f2f7a

View file

@ -42,7 +42,7 @@ module.exports = class Led extends StaticProperties(Widget, {bypass: true, inter
super({...options, html: html`<inner></inner>`})
this.setValueIntensity(this.getProp('mode') === 'intensity' ? this.getProp('range').min : 1)
this.setValueIntensity(this.getProp('mode') === 'intensity' ? this.getProp('range').min : this.getProp('range').max)
var bR = this.getProp('borderRadius')
if (parseInt(bR) == bR) bR += 'rem'