mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-09 14:22:08 -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() {
|
toCssString: function() {
|
||||||
if (!this._cssString) {
|
if (!this._cssString) {
|
||||||
var color = this._colorType === 'rgb'
|
var color = this.convert('rgb');
|
||||||
? this
|
|
||||||
: this.convert('rgb');
|
|
||||||
var alpha = color.getAlpha();
|
var alpha = color.getAlpha();
|
||||||
var components = [
|
var components = [
|
||||||
Math.round(color.getRed() * 255),
|
Math.round(color.getRed() * 255),
|
||||||
|
|
Loading…
Reference in a new issue