mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Make sure alpha channel is included in serialization of Color.
Fixes #215.
This commit is contained in:
parent
618e19cc96
commit
fcb697264f
1 changed files with 3 additions and 2 deletions
|
@ -580,11 +580,12 @@ var Color = this.Color = Base.extend(new function() {
|
|||
},
|
||||
|
||||
_serialize: function(options, dictionary) {
|
||||
var components = this.getComponents();
|
||||
return Base.serialize(
|
||||
// We can ommit the type for gray and rgb:
|
||||
/^(gray|rgb)$/.test(this._type)
|
||||
? this._components
|
||||
: [this._type].concat(this._components),
|
||||
? components
|
||||
: [this._type].concat(components),
|
||||
options, true, dictionary);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue