Curve: Implement selection of curves.

This commit is contained in:
Jonathan Puckey 2011-04-21 19:54:32 +02:00
parent cf541901dd
commit abb0878a25

View file

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