From da3f98519e946dd577bcd6bfcda261ebd7ed2600 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 20 Nov 2012 17:21:55 +0000 Subject: [PATCH] Slider min>0 bug fix git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2145 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 328e6e09b..711a9af59 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -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;'); }