mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Allow CompoundPath to have named children.
This commit is contained in:
parent
e2b7d4c924
commit
503a031bdf
2 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue