mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Fix slider for devices without RGB
Fix slider for devices with one or two channels like only white or white/yellow
This commit is contained in:
parent
09f9104465
commit
5524075b04
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
### 7.1.0.1 20191130
|
### 7.1.0.1 20191130
|
||||||
|
|
||||||
|
- Fix slider for devices with one or two channels like only white or white/yellow
|
||||||
|
|
||||||
## Released
|
## Released
|
||||||
|
|
||||||
### 7.1.0 20191129
|
### 7.1.0 20191129
|
||||||
|
@ -154,10 +154,12 @@ const char HTTP_SCRIPT_ROOT[] PROGMEM =
|
|||||||
|
|
||||||
const char HTTP_SCRIPT_ROOT_PART2[] PROGMEM =
|
const char HTTP_SCRIPT_ROOT_PART2[] PROGMEM =
|
||||||
"function lc(v,i,p){"
|
"function lc(v,i,p){"
|
||||||
|
"if(eb('s')){" // Check if Saturation is in DOM otherwise javascript fails on la()
|
||||||
"if(v=='h'||v=='d'){" // Hue or Brightness changed so change Saturation colors too
|
"if(v=='h'||v=='d'){" // Hue or Brightness changed so change Saturation colors too
|
||||||
"var sl=eb('sl4').value;"
|
"var sl=eb('sl4').value;"
|
||||||
"eb('s').style.background='linear-gradient(to right,rgb('+sl+'%%,'+sl+'%%,'+sl+'%%),hsl('+eb('sl2').value+',100%%,50%%))';"
|
"eb('s').style.background='linear-gradient(to right,rgb('+sl+'%%,'+sl+'%%,'+sl+'%%),hsl('+eb('sl2').value+',100%%,50%%))';"
|
||||||
"}"
|
"}"
|
||||||
|
"}"
|
||||||
"la('&'+v+i+'='+p);"
|
"la('&'+v+i+'='+p);"
|
||||||
"}"
|
"}"
|
||||||
"wl(la);";
|
"wl(la);";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user