Commit 147f940e authored by olau@iola.dk's avatar olau@iola.dk

Fix problem with floating point comparison (report and patch by jparish9001)


git-svn-id: https://flot.googlecode.com/svn/trunk@286 1e0a6537-2640-0410-bfb7-f154510ff394
parent 8e82c4ce
...@@ -403,7 +403,7 @@ More detail and specific examples can be found in the included HTML file. ...@@ -403,7 +403,7 @@ More detail and specific examples can be found in the included HTML file.
} }
ctx.beginPath(); ctx.beginPath();
if (angle!=Math.PI*2) if (Math.abs(angle - Math.PI*2) > 0.000000001)
ctx.moveTo(0,0); // Center of the pie ctx.moveTo(0,0); // Center of the pie
else if ($.browser.msie) else if ($.browser.msie)
angle -= 0.0001; angle -= 0.0001;
...@@ -688,7 +688,7 @@ More detail and specific examples can be found in the included HTML file. ...@@ -688,7 +688,7 @@ More detail and specific examples can be found in the included HTML file.
octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor
octx.beginPath(); octx.beginPath();
if (series.angle!=Math.PI*2) if (Math.abs(series.angle - Math.PI*2) > 0.000000001)
octx.moveTo(0,0); // Center of the pie octx.moveTo(0,0); // Center of the pie
octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false); octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);
octx.closePath(); octx.closePath();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment