From ffc5c6d981b403052ec3961f12b070906d14e901 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Fri, 22 Apr 2011 18:42:32 +0200 Subject: [PATCH] Fix BezierTool to work with new segment selection code. --- examples/Tools/BezierTool.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/Tools/BezierTool.html b/examples/Tools/BezierTool.html index 2caeccaf..62e08ffb 100644 --- a/examples/Tools/BezierTool.html +++ b/examples/Tools/BezierTool.html @@ -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; } }