mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
Slider min>0 bug fix
git-svn-id: https://svn.fhem.de/fhem/trunk@2145 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bc95538e6b
commit
0070e45b5a
@ -63,7 +63,7 @@ Slider(slider, min, stp, max, curr, cmd)
|
|||||||
{
|
{
|
||||||
maxX = slider.offsetWidth-sh.offsetWidth;
|
maxX = slider.offsetWidth-sh.offsetWidth;
|
||||||
if(curr) {
|
if(curr) {
|
||||||
offX += curr*maxX/(max-min);
|
offX += (curr-min)*maxX/(max-min);
|
||||||
sh.innerHTML = curr;
|
sh.innerHTML = curr;
|
||||||
sh.setAttribute('style', 'left:'+offX+'px;');
|
sh.setAttribute('style', 'left:'+offX+'px;');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user