diff --git a/NEWS.txt b/NEWS.txt index 434e749..586b258 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -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 diff --git a/jquery.flot.js b/jquery.flot.js index ffaa859..1912442 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -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);