mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix BezierTool to work with new segment selection code.
This commit is contained in:
parent
538f360a6b
commit
ffc5c6d981
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue