mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Fix accidentally reversed change and clean up code a bit.
This commit is contained in:
parent
f150552a9c
commit
6fc418b581
1 changed files with 4 additions and 3 deletions
|
@ -74,7 +74,6 @@ var Color = this.Color = Base.extend(new function() {
|
|||
? new HSBColor(arg.hue, arg.saturation, arg.brightness,
|
||||
arg.alpha)
|
||||
: new RGBColor(); // Fallback
|
||||
|
||||
} else {
|
||||
// Called on a subclass instance. Return the converted
|
||||
// color.
|
||||
|
@ -91,7 +90,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
? rgbColor.convert(this._colorType)
|
||||
: rgbColor;
|
||||
} else {
|
||||
var components = isArray ? arg : arguments;
|
||||
var components = isArray ? arg
|
||||
: Array.prototype.slice.call(arguments);
|
||||
if (!this._colorType) {
|
||||
// Called on the abstract Color class. Guess color type
|
||||
// from arg
|
||||
|
@ -113,7 +113,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
// TODO: Is this correct?
|
||||
// Shouldn't alpha be set to -1?
|
||||
: name === 'alpha' ? 1 : null;
|
||||
}, this);
|
||||
},
|
||||
this);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue