From 503a031bdf823bd02190e2fbef508aa7ec65f5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 17 Jun 2011 14:11:37 +0100 Subject: [PATCH] Allow CompoundPath to have named children. --- src/item/Group.js | 1 + src/path/CompoundPath.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/item/Group.js b/src/item/Group.js index bc463c98..25a0efba 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -69,6 +69,7 @@ var Group = this.Group = Item.extend({ */ initialize: function(items) { this.base(); + // Allow Group to have children and named children this._children = []; this._namedChildren = {}; this.setChildren(!items || !Array.isArray(items) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index e54e9ad9..a8b91f23 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -42,7 +42,9 @@ var CompoundPath = this.CompoundPath = PathItem.extend({ */ initialize: function(paths) { this.base(); + // Allow CompoundPath to have children and named children. this._children = []; + this._namedChildren = {}; // Do not reassign to paths, since arguments would get modified, which // we potentially use as array, depending on what is passed. var items = !paths || !Array.isArray(paths)