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:
rudolfkoenig
2012-11-20 17:21:55 +00:00
parent e2c9a728ae
commit ade92b11f2

View File

@@ -63,7 +63,7 @@ Slider(slider, min, stp, max, curr, cmd)
{
maxX = slider.offsetWidth-sh.offsetWidth;
if(curr) {
offX += curr*maxX/(max-min);
offX += (curr-min)*maxX/(max-min);
sh.innerHTML = curr;
sh.setAttribute('style', 'left:'+offX+'px;');
}