Move #_countSelectedSegment().

This commit is contained in:
Jürg Lehni 2011-05-26 11:38:26 +01:00
parent e31081f2fc
commit 3e7806ae50

View file

@ -268,6 +268,13 @@ var Path = this.Path = PathItem.extend({
return segs;
},
_countSelectedSegment: function(segment) {
var count = this._selectedSegmentCount +=
segment._selectionState ? 1 : -1;
if (count <= 1)
this._project._selectItem(this, count == 1);
},
// PORT: Add support for adding multiple segments at once to Sg
/**
* Adds one or more segments to the end of the segment list of this path.
@ -402,13 +409,6 @@ var Path = this.Path = PathItem.extend({
? SelectionState.POINT : 0;
},
_countSelectedSegment: function(segment) {
var count = this._selectedSegmentCount +=
segment._selectionState ? 1 : -1;
if (count <= 1)
this._project._selectItem(this, count == 1);
},
/**
* Specifies whether all segments of the path are selected.
*