From f71967f3d3bfc09f69c1cd89c3ae00008141d7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 27 Apr 2011 17:57:56 +0100 Subject: [PATCH] Further simplify and compress code. --- src/path/Segment.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/path/Segment.js b/src/path/Segment.js index 0611769f..85f6d630 100644 --- a/src/path/Segment.js +++ b/src/path/Segment.js @@ -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) {