diff --git a/NEWS.txt b/NEWS.txt index ab0639d..0b1fa69 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -51,6 +51,8 @@ Bug fixes: by exists, issue 75). - Only set position relative on placeholder if it hasn't already a position different from static (reported by kyberneticist, issue 95). +- Don't round markings to prevent sub-pixel problems (reported by Dan + Lipsitt). Flot 0.5 diff --git a/jquery.flot.js b/jquery.flot.js index 42190da..1e7a930 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -906,17 +906,18 @@ ctx.strokeStyle = m.color || options.grid.markingsColor; ctx.beginPath(); ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth; - ctx.moveTo(Math.floor(xrange.from), Math.floor(yrange.from)); - ctx.lineTo(Math.floor(xrange.to), Math.floor(yrange.to)); + //ctx.moveTo(Math.floor(xrange.from), yrange.from); + //ctx.lineTo(Math.floor(xrange.to), yrange.to); + ctx.moveTo(xrange.from, yrange.from); + ctx.lineTo(xrange.to, yrange.to); ctx.stroke(); } else { // fill area ctx.fillStyle = m.color || options.grid.markingsColor; - ctx.fillRect(Math.floor(xrange.from), - Math.floor(yrange.to), - Math.floor(xrange.to - xrange.from), - Math.floor(yrange.from - yrange.to)); + ctx.fillRect(xrange.from, yrange.to, + xrange.to - xrange.from, + yrange.from - yrange.to); } } }