Define setter for Segment#linear.

This commit is contained in:
Jürg Lehni 2013-03-01 20:24:46 -08:00
parent 5140e8f003
commit dfe1a7efab

View file

@ -169,15 +169,21 @@ var Segment = this.Segment = Base.extend(/** @lends Segment# */{
},
/**
* Checks whether the segment has no handles defined, meaning it connects
* Specifies whether the segment has no handles defined, meaning it connects
* two straight lines.
*
* @return {Boolean} {@true the segment is linear}
* @type Point
* @bean
*/
isLinear: function() {
return this._handleIn.isZero() && this._handleOut.isZero();
},
setLinear: function() {
this._handleIn.set(0, 0);
this._handleOut.set(0, 0);
},
_isSelected: function(point) {
var state = this._selectionState;
return point == this._point ? !!(state & /*#=*/ SelectionState.POINT)