mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Item#_clone: check if the item has a _pathStyle property before copying it.
This commit is contained in:
parent
777cc95dc3
commit
013fe56ea4
1 changed files with 3 additions and 2 deletions
|
@ -33,8 +33,9 @@ var Item = this.Item = Base.extend({
|
|||
},
|
||||
|
||||
_clone: function(copy) {
|
||||
// Copy over style
|
||||
copy.setStyle(this._style);
|
||||
// If this item has a pathStyle, copy it:
|
||||
if (this._style)
|
||||
copy.setStyle(this._style);
|
||||
// If this item has children, clone and append each of them:
|
||||
if (this._children) {
|
||||
for (var i = 0, l = this._children.length; i < l; i++)
|
||||
|
|
Loading…
Reference in a new issue