Fix BezierTool to work with new segment selection code.

This commit is contained in:
Jonathan Puckey 2011-04-22 18:42:32 +02:00
parent 538f360a6b
commit ffc5c6d981

View file

@ -30,11 +30,12 @@
var currentSegment, mode, type;
function onMouseDown(event) {
if (currentSegment)
currentSegment.selected = false;
mode = type = currentSegment = null;
if (!path) {
path = new Path();
path.selected = true;
path.fillColor = new HSBColor(360 * Math.random(), 1, 1, 0.5);
}
@ -55,6 +56,7 @@
mode = currentSegment ? 'move' : 'add';
if (!currentSegment)
currentSegment = path.add(event.point);
currentSegment.selected = true;
}
}