Commit e5d22378 authored by David Schnur's avatar David Schnur

Use floor instead of round for better sub-pixel accuracy.

parent 4c86903b
......@@ -147,12 +147,12 @@ The plugin also adds four public methods:
ctx.beginPath();
if (c.mode.indexOf("x") != -1) {
var drawX = Math.round(crosshair.x) + adj;
var drawX = Math.floor(crosshair.x) + adj;
ctx.moveTo(drawX, 0);
ctx.lineTo(drawX, plot.height());
}
if (c.mode.indexOf("y") != -1) {
var drawY = Math.round(crosshair.y) + adj;
var drawY = Math.floor(crosshair.y) + adj;
ctx.moveTo(0, drawY);
ctx.lineTo(plot.width(), drawY);
}
......
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