From 0963fdf50446684c23fa0d2d3072874acf25f8d0 Mon Sep 17 00:00:00 2001 From: Dan Rufener Date: Fri, 13 Dec 2013 10:03:12 -0800 Subject: [PATCH] Stop subtracting 14 pixels from the right side of the canvas for determining the rectangle for graphing in. This behavior is unpredictable and makes implementing something like a range slider where pixels get mapped to time very challenging. --- graphy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphy.js b/graphy.js index 76ca3d9..f2377b3 100644 --- a/graphy.js +++ b/graphy.js @@ -2035,7 +2035,7 @@ Graphy.renderers = { if ( action == "measure" ) { graphRect.bottom = $canvas.height() - 24 - ( graph.xUnits().length ? 20 : 0 ); - graphRect.right = $canvas.width() - 14; + graphRect.right = $canvas.width(); } else { var numberOfLabels = Math.max( Math.floor( ( graphRect.right - graphRect.left ) / 72 ) + 1, 2 ); Graphy.renderers.axis.xValueLabels( numberOfLabels, 0, graphRect.bottom + 10, "graphy_axis_line_x_value_label", "center", graph ); @@ -2058,7 +2058,7 @@ Graphy.renderers = { if ( action == "measure" ) { graphRect.bottom = $canvas.height() - 24 - ( graph.xUnits().length ? 20 : 0 ); - graphRect.right = $canvas.width() - 14; + graphRect.right = $canvas.width(); } else { ctx.save();