mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Use internal variables in CompoundPath#moveBy and Segment#isSelected.
This commit is contained in:
parent
af0543dac8
commit
1ea0a811b5
2 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
moveBy: function() {
|
||||
var point = arguments.length ? Point.read(arguments) : new Point();
|
||||
var path = getCurrentPath(this);
|
||||
var current = path.segments[path.segments.length - 1].point;
|
||||
var current = path.segments[path.segments.length - 1]._point;
|
||||
this.moveTo(current.add(point));
|
||||
},
|
||||
|
||||
|
|
|
@ -126,14 +126,14 @@ var Segment = this.Segment = Base.extend({
|
|||
},
|
||||
|
||||
isSelected: function(/* point */) {
|
||||
var point = arguments.length ? arguments[0] : this.point;
|
||||
var point = arguments.length ? arguments[0] : this._point;
|
||||
var state = this._selectionState;
|
||||
if (point == this.point) {
|
||||
if (point == this._point) {
|
||||
return state == SelectionState.POINT;
|
||||
} else if (point == this.handleIn) {
|
||||
} else if (point == this._handleIn) {
|
||||
return (state & SelectionState.HANDLE_IN)
|
||||
== SelectionState.HANDLE_IN;
|
||||
} else if (point == this.handleOut) {
|
||||
} else if (point == this._handleOut) {
|
||||
return (state & SelectionState.HANDLE_OUT)
|
||||
== SelectionState.HANDLE_OUT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue