Skip to content

Commit

Permalink
additonal function to return type of color configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bhofmei committed Nov 14, 2016
1 parent be18b9d commit 6b32e6b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion js/View/ColorHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,17 @@ ColorHandler = {
return colorConfig[seqCtx]
else
return randomColors[seqCtx]
}
},

getColorType: function( colorConfig ){
// return "random", "single", or "individual"
if(colorConfig === 'random')
return 'random';
else if(typeof colorConfig === 'string')
return 'single';
else
return 'individual';
},

}
return ColorHandler;
Expand Down

0 comments on commit 6b32e6b

Please sign in to comment.