mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Further simplify and compress code.
This commit is contained in:
parent
6b6f27cb6e
commit
f71967f3d3
1 changed files with 4 additions and 8 deletions
|
@ -132,14 +132,10 @@ var Segment = this.Segment = Base.extend({
|
||||||
|
|
||||||
_isSelected: function(point) {
|
_isSelected: function(point) {
|
||||||
var state = this._selectionState;
|
var state = this._selectionState;
|
||||||
if (point == this._point) {
|
return point == this._point ? !!(state & SelectionState.POINT)
|
||||||
return !!(state & SelectionState.POINT);
|
: point == this._handleIn ? !!(state & SelectionState.HANDLE_IN)
|
||||||
} else if (point == this._handleIn) {
|
: point == this._handleOut ? !!(state & SelectionState.HANDLE_OUT)
|
||||||
return !!(state & SelectionState.HANDLE_IN);
|
: false;
|
||||||
} else if (point == this._handleOut) {
|
|
||||||
return !!(state & SelectionState.HANDLE_OUT);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_setSelected: function(point, selected) {
|
_setSelected: function(point, selected) {
|
||||||
|
|
Loading…
Reference in a new issue