mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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;
|
var currentSegment, mode, type;
|
||||||
function onMouseDown(event) {
|
function onMouseDown(event) {
|
||||||
|
if (currentSegment)
|
||||||
|
currentSegment.selected = false;
|
||||||
mode = type = currentSegment = null;
|
mode = type = currentSegment = null;
|
||||||
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = new Path();
|
path = new Path();
|
||||||
path.selected = true;
|
|
||||||
path.fillColor = new HSBColor(360 * Math.random(), 1, 1, 0.5);
|
path.fillColor = new HSBColor(360 * Math.random(), 1, 1, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@
|
||||||
mode = currentSegment ? 'move' : 'add';
|
mode = currentSegment ? 'move' : 'add';
|
||||||
if (!currentSegment)
|
if (!currentSegment)
|
||||||
currentSegment = path.add(event.point);
|
currentSegment = path.add(event.point);
|
||||||
|
currentSegment.selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue