Use internal variables in CompoundPath#moveBy and Segment#isSelected.

This commit is contained in:
Jonathan Puckey 2011-04-21 21:06:35 +02:00
parent af0543dac8
commit 1ea0a811b5
2 changed files with 5 additions and 5 deletions

View file

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

View file

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