mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Some internal refactoring.
This commit is contained in:
parent
1eecc97fc7
commit
5d00c30ece
6 changed files with 10 additions and 10 deletions
|
@ -1067,7 +1067,7 @@ var LinkedPoint = Point.extend({
|
|||
},
|
||||
|
||||
setSelected: function(selected) {
|
||||
this._owner.changeSelection(this._getSelection(), selected);
|
||||
this._owner._changeSelection(this._getSelection(), selected);
|
||||
},
|
||||
|
||||
_getSelection: function() {
|
||||
|
|
|
@ -957,8 +957,8 @@ new function() {
|
|||
|
||||
setSelected: function(selected) {
|
||||
var owner = this._owner;
|
||||
if (owner.changeSelection) {
|
||||
owner.changeSelection(/*#=*/ItemSelection.BOUNDS, selected);
|
||||
if (owner._changeSelection) {
|
||||
owner._changeSelection(/*#=*/ItemSelection.BOUNDS, selected);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -555,7 +555,7 @@ new function() { // Injection scope for various item event handlers
|
|||
}
|
||||
},
|
||||
|
||||
changeSelection: function(flag, selected) {
|
||||
_changeSelection: function(flag, selected) {
|
||||
var selection = this._selection;
|
||||
this.setSelection(selected ? selection | flag : selection & ~flag);
|
||||
},
|
||||
|
@ -602,7 +602,7 @@ new function() { // Injection scope for various item event handlers
|
|||
for (var i = 0, l = children.length; i < l; i++)
|
||||
children[i].setSelected(selected);
|
||||
}
|
||||
this.changeSelection(/*#=*/ItemSelection.ITEM, selected);
|
||||
this._changeSelection(/*#=*/ItemSelection.ITEM, selected);
|
||||
},
|
||||
|
||||
isFullySelected: function() {
|
||||
|
@ -624,7 +624,7 @@ new function() { // Injection scope for various item event handlers
|
|||
for (var i = 0, l = children.length; i < l; i++)
|
||||
children[i].setFullySelected(selected);
|
||||
}
|
||||
this.changeSelection(/*#=*/ItemSelection.ITEM, selected);
|
||||
this._changeSelection(/*#=*/ItemSelection.ITEM, selected);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1001,7 +1001,7 @@ PathItem.inject(new function() {
|
|||
if (finished) {
|
||||
if (closed) {
|
||||
// Carry over the last handleIn to the first segment.
|
||||
path.firstSegment.setHandleIn(handleIn);
|
||||
path.getFirstSegment().setHandleIn(handleIn);
|
||||
path.setClosed(closed);
|
||||
}
|
||||
// Only add finished paths that cover an area to the result.
|
||||
|
|
|
@ -288,7 +288,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
}
|
||||
},
|
||||
|
||||
changeSelection: function(flag, selected) {
|
||||
_changeSelection: function(flag, selected) {
|
||||
var selection = this._selection;
|
||||
this.setSelection(selected ? selection | flag : selection & ~flag);
|
||||
},
|
||||
|
@ -313,7 +313,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
},
|
||||
|
||||
setSelected: function(selected) {
|
||||
this.changeSelection(/*#=*/SegmentSelection.ALL, selected);
|
||||
this._changeSelection(/*#=*/SegmentSelection.ALL, selected);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -85,7 +85,7 @@ var SegmentPoint = Point.extend({
|
|||
},
|
||||
|
||||
setSelected: function(selected) {
|
||||
this._owner.changeSelection(this._getSelection(), selected);
|
||||
this._owner._changeSelection(this._getSelection(), selected);
|
||||
},
|
||||
|
||||
_getSelection: function() {
|
||||
|
|
Loading…
Reference in a new issue