Commit c20370ab authored by goorpy's avatar goorpy

Add comment and desired structure to colors patch

Per request from dnschnur (https://github.com/flot/flot/pull/1034#issuecomment-17119203), I have: 
- Added a comment explaining the purpose of the new check/override
- Changed the structure to match preferred standard structure
parent fccc8a6e
......@@ -642,7 +642,11 @@ Licensed under the MIT license.
$.extend(true, options, opts);
if (opts.colors) options.colors = opts.colors;
//Override options.colors after $.extend if user has set colors, because extend does not clear out excess
//default colors if user defines color palette smaller than default palette size (currently 5).
if (opts.colors) {
options.colors = opts.colors;
}
if (options.xaxis.color == null)
options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
......
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