You need to sign in or sign up before continuing.
Commit 5a606968 authored by Ole Laursen's avatar Ole Laursen

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

parent f5efa0d4
......@@ -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);
......
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