Implement Shape#clone()

This commit is contained in:
Jürg Lehni 2013-10-16 15:04:50 +02:00
parent b35296ef3e
commit 9eb1c104da

View file

@ -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.
*