diff --git a/src/basic/Line.js b/src/basic/Line.js index 5458471c..af99855c 100644 --- a/src/basic/Line.js +++ b/src/basic/Line.js @@ -113,11 +113,11 @@ var Line = Base.extend(/** @lends Line# */{ }, isCollinear: function(line) { - return Point.isCollinear(this._vx, this._vy, line._vx, line._yy); + return Point.isCollinear(this._vx, this._vy, line._vx, line._vy); }, isOrthogonal: function(line) { - return Point.isOrthogonal(this._vx, this._vy, line._vx, line._yy); + return Point.isOrthogonal(this._vx, this._vy, line._vx, line._vy); }, statics: /** @lends Line */{ diff --git a/src/path/Curve.js b/src/path/Curve.js index a7cad223..64003210 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -394,14 +394,12 @@ var Curve = Base.extend(/** @lends Curve# */{ }, /** - * The total direction of the curve as a vector pointing from - * {@link #point1} to {@link #point2}. - * - * @type Point + * @type Line * @bean + * @private */ - getVector: function() { - return this._segment2._point.subtract(this._segment1._point); + getLine: function() { + return new Line(this._segment1._point, this._segment2._point); }, /** @@ -960,7 +958,7 @@ statics: { */ isCollinear: function(curve) { return curve && this.isStraight() && curve.isStraight() - && this.getVector().isCollinear(curve.getVector()); + && this.getLine().isCollinear(curve.getLine()); }, /**