mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-21 17:40:54 +00:00
slider sends (browser dependent) lots of events, throttle using only unique values.
This commit is contained in:
parent
8cdedaf3cb
commit
9ab8a84ff0
4
data/js/controls.js
vendored
4
data/js/controls.js
vendored
@ -799,9 +799,11 @@ function start() {
|
||||
websock.onmessage = handleEvent;
|
||||
}
|
||||
|
||||
var sliderCache = {};
|
||||
function sliderchange(number) {
|
||||
var val = $("#sl" + number).val();
|
||||
websock.send("slvalue:" + val + ":" + number);
|
||||
sliderCache[number] !== val && websock.send("slvalue:" + val + ":" + number);
|
||||
sliderCache[number] = val;
|
||||
}
|
||||
|
||||
function numberchange(number) {
|
||||
|
251
data/js/controls.min.js
vendored
251
data/js/controls.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user