Define Segment#clone().

This commit is contained in:
Jürg Lehni 2011-12-07 11:54:41 +01:00
parent 566aaed0be
commit 120ead209e

View file

@ -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)