Fix calculation of plot offset to round values to prevent another source of blurry borders

pull/1/head
Ole Laursen 15 years ago
parent f5efa0d4fb
commit 5a60696886

@ -31,6 +31,8 @@ Bug fixes
- Fix problem with event clicking and hovering in IE 8 by updating
Excanvas and removing previous work-around (test case by Ara
Anjargolian).
- Fix issues with blurry 1px border when some measures aren't integer
(reported by Ara Anjargolian).
Flot 0.7

@ -1002,7 +1002,7 @@
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
}
margins.x = margins.y = minMargin;
margins.x = margins.y = Math.ceil(minMargin);
// check axis labels, note we don't check the actual
// labels but instead use the overall width/height to not
@ -1010,7 +1010,7 @@
$.each(allAxes(), function (_, axis) {
var dir = axis.direction;
if (axis.reserveSpace)
margins[dir] = Math.max(margins[dir], (dir == "x" ? axis.labelWidth : axis.labelHeight) / 2);
margins[dir] = Math.ceil(Math.max(margins[dir], (dir == "x" ? axis.labelWidth : axis.labelHeight) / 2));
});
plotOffset.left = Math.max(margins.x, plotOffset.left);

Loading…
Cancel
Save