mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhemweb_colorpicker.js: fixed racecondition for colorpicker CT
git-svn-id: https://svn.fhem.de/fhem/trunk@18418 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
93595d14dd
commit
b877c06c05
@ -191,13 +191,13 @@ FW_colorpickerCreate(elName, devName, vArr, currVal, set, params, cmd)
|
||||
|
||||
var newEl = FW_createSlider(elName, devName, ["slider",vArr[2],vArr[3],vArr[4]], currVal, undefined, params, cmd);
|
||||
|
||||
old_set_fn = newEl.setValueFn;
|
||||
newEl.old_set_fn = newEl.setValueFn;
|
||||
newEl.setValueFn = function(arg) {
|
||||
arg = arg.match(/[\d.\-]*/)[0];
|
||||
if( +arg < +vArr[2]
|
||||
|| +arg > +vArr[4] )
|
||||
arg = Math.round(1000000/arg).toString();
|
||||
old_set_fn(arg);
|
||||
this.old_set_fn(arg);
|
||||
}
|
||||
|
||||
if( vArr[4] < 1000 )
|
||||
|
Loading…
Reference in New Issue
Block a user