mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -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,6 +172,9 @@ var Item = this.Item = Base.extend(Callback, {
|
||||||
// Serialize style fields, but only if they differ from defaults.
|
// Serialize style fields, but only if they differ from defaults.
|
||||||
// Use no compacting there, since colors always need their type
|
// Use no compacting there, since colors always need their type
|
||||||
// identifiers.
|
// identifiers.
|
||||||
|
// 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);
|
serialize(this._style._defaults, false);
|
||||||
// There is no compact form for Item serialization, we always keep the
|
// There is no compact form for Item serialization, we always keep the
|
||||||
// type.
|
// type.
|
||||||
|
|
Loading…
Reference in a new issue