From bd5f0691e66f0f328ac372e3b82a7ebe07bd9e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 14 Feb 2013 21:54:52 -0800 Subject: [PATCH] Do not serialize styles on Groups and Layers, since they just unify their children's own styles. --- src/item/Item.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index 4456dfba..37c1f6c5 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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 ];