diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/tools/PenTool.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 4258593e..4ff77371 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js | |||
@@ -566,6 +566,7 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
566 | var newCanvas = null; | 566 | var newCanvas = null; |
567 | newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); | 567 | newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); |
568 | var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas, true); | 568 | var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas, true); |
569 | //note that we set the notify event to false because we send the event separately at end of this code block | ||
569 | ElementMediator.addElements(newCanvas, elementModel.data, false); | 570 | ElementMediator.addElements(newCanvas, elementModel.data, false); |
570 | 571 | ||
571 | // create all the GL stuff | 572 | // create all the GL stuff |
@@ -602,6 +603,9 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
602 | // TODO - update the shape's info only. shapeModel will likely need an array of shapes. | 603 | // TODO - update the shape's info only. shapeModel will likely need an array of shapes. |
603 | } | 604 | } |
604 | 605 | ||
606 | //now send the event that will add this canvas to the timeline | ||
607 | NJevent("elementAdded", newCanvas); | ||
608 | |||
605 | if(newCanvas.elementModel.isShape) //todo why is this not true for the path canvas? | 609 | if(newCanvas.elementModel.isShape) //todo why is this not true for the path canvas? |
606 | { | 610 | { |
607 | this.application.ninja.selectionController.selectElement(newCanvas); | 611 | this.application.ninja.selectionController.selectElement(newCanvas); |