mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Add support for _setProperties() to CompoundPath constructor.
This commit is contained in:
parent
ba5aa86411
commit
c5ede2e955
1 changed files with 4 additions and 5 deletions
|
@ -41,14 +41,13 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
|||
* // Move the inner circle 5pt to the right:
|
||||
* compoundPath.children[1].position.x += 5;
|
||||
*/
|
||||
initialize: function(paths) {
|
||||
initialize: function(arg) {
|
||||
this.base();
|
||||
// Allow CompoundPath to have children and named children.
|
||||
// CompoundPath has children and supports 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.
|
||||
this.addChildren(Array.isArray(paths) ? paths : arguments);
|
||||
if (!this._setProperties(arg))
|
||||
this.addChildren(Array.isArray(arg) ? arg : arguments);
|
||||
},
|
||||
|
||||
insertChild: function(index, item, _cloning) {
|
||||
|
|
Loading…
Reference in a new issue