]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Thu, 6 Dec 2012 16:35:36 +0000 (16:35 +0000)
committerhadeshyp <hadeshyp>
Thu, 6 Dec 2012 16:35:36 +0000 (16:35 +0000)
cts/htdocs/scripts/scripts.js

index ee458dc4cd27e8c6ec07b8bfaf74ad485d043a74..5fb6966d71126935dea8b6f0f3c8af9b1a7f3e9f 100644 (file)
@@ -39,7 +39,7 @@ function findcolor(v,min,max,lg) {
   if (max == undefined){max  = 1;}
 
   step = ((max-min)/655);
-
+  v =  Math.round(v);
 
   if (v == 0 || v<min) {
     return "transparent";
@@ -64,9 +64,9 @@ function findcolor(v,min,max,lg) {
       b = 0;
     }
   }
-r = Math.round(r);
-g = Math.round(g);
-b = Math.round(b);
+r = Math.floor(r);
+g = Math.floor(g);
+b = Math.floor(b);
 
   return "rgb("+(r%256)+","+(g%256)+","+(b%256)+")";