mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Define Segment#clone().
This commit is contained in:
parent
566aaed0be
commit
120ead209e
1 changed files with 4 additions and 0 deletions
|
@ -318,6 +318,10 @@ var Segment = this.Segment = Base.extend(/** @lends Segment# */{
|
|||
return this._path ? !!this._path.removeSegment(this._index) : false;
|
||||
},
|
||||
|
||||
clone: function() {
|
||||
return new Segment(this._point, this._handleIn, this._handleOut);
|
||||
},
|
||||
|
||||
equals: function(segment) {
|
||||
return segment == this || segment
|
||||
&& this._point.equals(segment._point)
|
||||
|
|
Loading…
Reference in a new issue