Some internal refactoring.

This commit is contained in:
Jürg Lehni 2017-06-07 16:56:44 +02:00
parent 1eecc97fc7
commit 5d00c30ece
6 changed files with 10 additions and 10 deletions

View file

@ -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() {

View file

@ -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);
}
}
})

View file

@ -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);
},
/**

View file

@ -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.

View file

@ -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);
},
/**

View file

@ -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() {