mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
No need to check for colorType since #convert() already performs this optimisation.
This commit is contained in:
parent
3b9369fafb
commit
32fb1b065e
1 changed files with 1 additions and 3 deletions
|
@ -333,9 +333,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
|
||||
toCssString: function() {
|
||||
if (!this._cssString) {
|
||||
var color = this._colorType === 'rgb'
|
||||
? this
|
||||
: this.convert('rgb');
|
||||
var color = this.convert('rgb');
|
||||
var alpha = color.getAlpha();
|
||||
var components = [
|
||||
Math.round(color.getRed() * 255),
|
||||
|
|
Loading…
Reference in a new issue