aboutsummaryrefslogtreecommitdiff
path: root/js/tools/PenTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-23 11:38:02 -0700
committerPushkar Joshi2012-04-23 11:38:02 -0700
commit5da51344c4abf53b4a77bbd4eefbea5ec67f1643 (patch)
tree3f214a2e032dc0320da95f78d298b0e6f7d9a165 /js/tools/PenTool.js
parent9f32d7e5454db3189209fc68a286a7fdb0c31fe8 (diff)
downloadninja-5da51344c4abf53b4a77bbd4eefbea5ec67f1643.tar.gz
allow the addition of the pen tool to the timeline
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-xjs/tools/PenTool.js4
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);