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
pull/1/head
olau@iola.dk 16 years ago
parent 8e82c4cef1
commit 147f940e5b

@ -403,7 +403,7 @@ More detail and specific examples can be found in the included HTML file.
}
ctx.beginPath();
if (angle!=Math.PI*2)
if (Math.abs(angle - Math.PI*2) > 0.000000001)
ctx.moveTo(0,0); // Center of the pie
else if ($.browser.msie)
angle -= 0.0001;
@ -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.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.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);
octx.closePath();

Loading…
Cancel
Save