mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
fhemweb.js: fix slider code for extracting number from reading-value
git-svn-id: https://svn.fhem.de/fhem/trunk@22260 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f9cffed213
commit
da88821e6e
@ -1692,7 +1692,7 @@ FW_createSlider(elName, devName, vArr, currVal, set, params, cmd)
|
||||
sh.ontouchstart = function(e) { touchFn(e, mouseDown); }
|
||||
|
||||
newEl.setValueFn = function(arg) {
|
||||
var res = arg.match(/[\d.\-]+/); // extract first number
|
||||
var res = arg.match(/-?[\d.]+/); // extract first number
|
||||
currVal = (res ? parseFloat(res[0]) : min);
|
||||
if(currVal < min || currVal > max)
|
||||
currVal = min;
|
||||
|
Loading…
x
Reference in New Issue
Block a user