mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-13 05:31:04 -04:00
Implement Shape#clone()
This commit is contained in:
parent
b35296ef3e
commit
9eb1c104da
1 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,13 @@ var Shape = Item.extend(/** @lends Shape# */{
|
|||
this._initialize(props, point);
|
||||
},
|
||||
|
||||
clone: function(insert) {
|
||||
return this._clone(new Shape(this._type, this.getPosition(true),
|
||||
this._size.clone(),
|
||||
this._radius.clone ? this._radius.clone() : this._radius,
|
||||
{ insert: false }), insert);
|
||||
},
|
||||
|
||||
/**
|
||||
* The size of the shape.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue