Further simplify and compress code.

This commit is contained in:
Jürg Lehni 2011-04-27 17:57:56 +01:00
parent 6b6f27cb6e
commit f71967f3d3

View file

@ -132,14 +132,10 @@ var Segment = this.Segment = Base.extend({
_isSelected: function(point) {
var state = this._selectionState;
if (point == this._point) {
return !!(state & SelectionState.POINT);
} else if (point == this._handleIn) {
return !!(state & SelectionState.HANDLE_IN);
} else if (point == this._handleOut) {
return !!(state & SelectionState.HANDLE_OUT);
}
return false;
return point == this._point ? !!(state & SelectionState.POINT)
: point == this._handleIn ? !!(state & SelectionState.HANDLE_IN)
: point == this._handleOut ? !!(state & SelectionState.HANDLE_OUT)
: false;
},
_setSelected: function(point, selected) {