mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-24 07:20:53 +00:00
Fixes #122
This commit is contained in:
parent
6f744a7995
commit
6800f0c208
5
data/js/controls.js
vendored
5
data/js/controls.js
vendored
@ -817,6 +817,11 @@ function start() {
|
||||
element.addClass(colorClass(data.color));
|
||||
}
|
||||
}
|
||||
|
||||
$(".range-slider__range").each(function(){
|
||||
$(this)[0].value = $(this).attr("value");
|
||||
$(this).next().html($(this).attr("value"));
|
||||
});
|
||||
};
|
||||
|
||||
websock.onmessage = handleEvent;
|
||||
|
3
data/js/controls.min.js
vendored
3
data/js/controls.min.js
vendored
@ -250,7 +250,8 @@ data.id+
|
||||
"'></pre>"+
|
||||
"</div>");requestOrientationPermission();}
|
||||
break;case UPDATE_LABEL:$("#l"+data.id).html(data.value);break;case UPDATE_SWITCHER:switcher(data.id,data.value=="0"?0:1);break;case UPDATE_SLIDER:slider_move($("#id"+data.id),data.value,"100",false);break;case UPDATE_NUMBER:$("#num"+data.id).val(data.value);break;case UPDATE_TEXT_INPUT:$("#text"+data.id).val(data.value);break;case UPDATE_SELECT:$("#select"+data.id).val(data.value);break;case UPDATE_BUTTON:case UPDATE_PAD:case UPDATE_CPAD:break;case UPDATE_GAUGE:$("#gauge"+data.id).val(data.value);break;case UPDATE_ACCEL:break;default:console.error("Unknown type or event");break;}
|
||||
if(data.type>=UPDATE_OFFSET&&data.type<UI_INITIAL_GUI){var element=$("#id"+data.id);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));}}};websock.onmessage=handleEvent;}
|
||||
if(data.type>=UPDATE_OFFSET&&data.type<UI_INITIAL_GUI){var element=$("#id"+data.id);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));}}
|
||||
$(".range-slider__range").each(function(){$(this)[0].value=$(this).attr("value");$(this).next().html($(this).attr("value"));});};websock.onmessage=handleEvent;}
|
||||
function sliderchange(number){var val=$("#sl"+number).val();websock.send("slvalue:"+val+":"+number);}
|
||||
function numberchange(number){var val=$("#num"+number).val();websock.send("nvalue:"+val+":"+number);}
|
||||
function textchange(number){var val=$("#text"+number).val();websock.send("tvalue:"+val+":"+number);}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user