From abb0878a254b53207f750a35e2b46ade9fe05736 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 21 Apr 2011 19:54:32 +0200 Subject: [PATCH] Curve: Implement selection of curves. --- src/path/Curve.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/path/Curve.js b/src/path/Curve.js index 1ee7d559..40d2a4b0 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -140,6 +140,17 @@ var Curve = this.Curve = Base.extend({ return curves && (curves[this._index1 - 1] || this._path.closed && curves[curves.length - 1]) || null; }, + + // TODO: port back to Scriptographer? + setSelected: function(selected) { + this.getHandle1().setSelected(selected); + this.getHandle2().setSelected(selected); + }, + + // TODO: port back to Scriptographer? + isSelected: function() { + return this.getHandle1().isSelected() && this.getHandle2.isSelected(); + }, getCurveValues: function() { var p1 = this._segment1._point,