mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Define setter for Segment#linear.
This commit is contained in:
parent
5140e8f003
commit
dfe1a7efab
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue