mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Do not serialize styles on Groups and Layers, since they just unify their children's own styles.
This commit is contained in:
parent
c3b5035aed
commit
bd5f0691e6
1 changed files with 4 additions and 1 deletions
|
@ -172,7 +172,10 @@ var Item = this.Item = Base.extend(Callback, {
|
|||
// Serialize style fields, but only if they differ from defaults.
|
||||
// Use no compacting there, since colors always need their type
|
||||
// identifiers.
|
||||
serialize(this._style._defaults, false);
|
||||
// Do not serialize styles on Groups and Layers, since they just unify
|
||||
// their children's own styles.
|
||||
if (!(this instanceof Group))
|
||||
serialize(this._style._defaults, false);
|
||||
// There is no compact form for Item serialization, we always keep the
|
||||
// type.
|
||||
return [ this._type, props ];
|
||||
|
|
Loading…
Reference in a new issue