mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Move #_countSelectedSegment().
This commit is contained in:
parent
e31081f2fc
commit
3e7806ae50
1 changed files with 7 additions and 7 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue