Use the @options.smooth directly if the value's type is "boolean".

This commit is contained in:
Taku AMANO 2013-07-30 10:39:25 +09:00
parent b98ae8ab1d
commit 13af310795
3 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ class Morris.Line extends Morris.Grid
# @private
generatePaths: ->
@paths = for i in [0...@options.ykeys.length]
smooth = @options.smooth is true or @options.ykeys[i] in @options.smooth
smooth = if typeof @options.smooth is "boolean" then @options.smooth else @options.ykeys[i] in @options.smooth
coords = ({x: r._x, y: r._y[i]} for r in @data when r._y[i] isnt undefined)
coords = (c for c in coords when c.y isnt null) if @options.continuousLine

View File

@ -788,7 +788,7 @@
var _i, _ref, _ref1, _results;
_results = [];
for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
smooth = this.options.smooth === true || (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
coords = (function() {
var _j, _len, _ref2, _results1;
_ref2 = this.data;

2
morris.min.js vendored

File diff suppressed because one or more lines are too long