Commit d85d6ef9 authored by olau@iola.dk's avatar olau@iola.dk

Patch from Mike R. Williamson to fix make set border color in options parsing code

git-svn-id: https://flot.googlecode.com/svn/trunk@126 1e0a6537-2640-0410-bfb7-f154510ff394
parent bf01441d
...@@ -25,7 +25,8 @@ Changes: ...@@ -25,7 +25,8 @@ Changes:
$.plot.formatDate(...) (suggestion by Matt Manela) and even $.plot.formatDate(...) (suggestion by Matt Manela) and even
replaced. replaced.
- Added "borderColor" option to the grid (patch from achamayou). - Added "borderColor" option to the grid (patch from achamayou and
patch from Mike R. Williamson).
Bug fixes: Bug fixes:
......
...@@ -161,7 +161,8 @@ ...@@ -161,7 +161,8 @@
function parseOptions(o) { function parseOptions(o) {
$.extend(true, options, o); $.extend(true, options, o);
if (options.grid.borderColor == null)
options.grid.borderColor = options.grid.color
// backwards compatibility, to be removed in future // backwards compatibility, to be removed in future
if (options.xaxis.noTicks && options.xaxis.ticks == null) if (options.xaxis.noTicks && options.xaxis.ticks == null)
options.xaxis.ticks = options.xaxis.noTicks; options.xaxis.ticks = options.xaxis.noTicks;
...@@ -969,7 +970,7 @@ ...@@ -969,7 +970,7 @@
if (options.grid.borderWidth) { if (options.grid.borderWidth) {
// draw border // draw border
ctx.lineWidth = options.grid.borderWidth; ctx.lineWidth = options.grid.borderWidth;
ctx.strokeStyle = options.grid.borderColor ? options.grid.borderColor : options.grid.color; ctx.strokeStyle = options.grid.borderColor;
ctx.lineJoin = "round"; ctx.lineJoin = "round";
ctx.strokeRect(0, 0, plotWidth, plotHeight); ctx.strokeRect(0, 0, plotWidth, plotHeight);
} }
......
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