From bea7604bf3891c9493e92bcb55bc285dc5cf45b2 Mon Sep 17 00:00:00 2001 From: eulenherr Date: Mon, 23 Jan 2012 10:37:59 +0100 Subject: [PATCH] Fix a bug that would cause g.line.js to display a y-axis from 0 to .5 when the maximum value is very small (< 0.001). In this case, t < to could equal true which would correct t to larger than .5 which would result in a drawn line that is basically on the x-axis. --- g.raphael.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g.raphael.js b/g.raphael.js index f49ffb5..7565437 100644 --- a/g.raphael.js +++ b/g.raphael.js @@ -782,7 +782,7 @@ Raphael.g = { t = round(to * Math.pow(10, i)) / Math.pow(10, i); if (t < to) { - t = round((to + .5) * Math.pow(10, i)) / Math.pow(10, i); + t = round((to + d) * Math.pow(10, i)) / Math.pow(10, i); } f = round((from - (i > 0 ? 0 : .5)) * Math.pow(10, i)) / Math.pow(10, i);