Fixed two corner-case bugs when drawing filled curves

git-svn-id: https://flot.googlecode.com/svn/trunk@96 1e0a6537-2640-0410-bfb7-f154510ff394
pull/1/head
olau@iola.dk 18 years ago
parent 230b746459
commit 45f0757d5d

@ -1,3 +1,10 @@
Flot 0.x
--------
Fixed two corner-case bugs when drawing filled curves (report and
analysis by Joshua Varner).
Flot 0.5
--------

@ -1180,11 +1180,13 @@
if (y1 >= axisy.max && y2 >= axisy.max) {
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
lastX = x2;
continue;
}
else if (y1 <= axisy.min && y2 <= axisy.min) {
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
lastX = x2;
continue;
}
@ -1239,8 +1241,8 @@
else
top = axisy.max;
ctx.lineTo(axisx.p2c(x2old), axisy.p2c(top));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(top));
ctx.lineTo(axisx.p2c(x2old), axisy.p2c(top));
}
lastX = Math.max(x2, x2old);

Loading…
Cancel
Save