Commit 436abc2f authored by olau@iola.dk's avatar olau@iola.dk

Really fix spacing bug

git-svn-id: https://flot.googlecode.com/svn/trunk@61 1e0a6537-2640-0410-bfb7-f154510ff394
parent 8d07034e
Flot x.x
--------
Fixed a bug in calculating spacing around the plot (reported by timothytoe).
Flot 0.4
--------
......
......@@ -695,7 +695,7 @@
dummyDiv.remove();
}
var maxOutset = options.grid.borderWidth;
var maxOutset = options.grid.borderWidth / 2;
if (options.points.show)
maxOutset = Math.max(maxOutset, options.points.radius + options.points.lineWidth/2);
for (i = 0; i < series.length; ++i) {
......@@ -705,6 +705,7 @@
plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = maxOutset;
if (yLabelMaxWidth > 0)
plotOffset.left += yLabelMaxWidth + options.grid.labelMargin;
plotWidth = canvasWidth - plotOffset.left - plotOffset.right;
......@@ -730,7 +731,9 @@
dummyDiv.remove();
}
if (xLabelMaxHeight > 0)
plotOffset.bottom += xLabelMaxHeight + options.grid.labelMargin;
plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;
hozScale = plotWidth / (xaxis.max - xaxis.min);
vertScale = plotHeight / (yaxis.max - yaxis.min);
......
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