1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-12-23 00:40:49 +00:00

fix sliderupdate

This commit is contained in:
Lukas Bachschwell 2019-12-28 15:05:27 +01:00
parent 9764db9789
commit bd7e324a31
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425

22
data/js/controls.js vendored
View File

@ -767,16 +767,17 @@ function start() {
if (data.type >= UPDATE_OFFSET && data.type < UI_INITIAL_GUI) {
var element = $("#id" + data.id);
// FIXME: Test sliderupdate
// if(data.type == UPDATE_SLIDER) {
// element.removeClass("slider-turquoise slider-emerald slider-peterriver slider-wetasphalt slider-sunflower slider-carrot slider-alizarin");
// element.addClass("slider-" + colorClass(data.color));
// } else {
element.removeClass(
"turquoise emerald peterriver wetasphalt sunflower carrot alizarin"
);
element.addClass(colorClass(data.color));
// }
if (data.type == UPDATE_SLIDER) {
element.removeClass(
"slider-turquoise slider-emerald slider-peterriver slider-wetasphalt slider-sunflower slider-carrot slider-alizarin"
);
element.addClass("slider-" + colorClass(data.color));
} else {
element.removeClass(
"turquoise emerald peterriver wetasphalt sunflower carrot alizarin"
);
element.addClass(colorClass(data.color));
}
}
};
@ -785,7 +786,6 @@ function start() {
function sliderchange(number) {
var val = $("#sl" + number).val();
console.log("slvalue:" + val + ":" + number);
websock.send("slvalue:" + val + ":" + number);
}