From 5da51344c4abf53b4a77bbd4eefbea5ec67f1643 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Mon, 23 Apr 2012 11:38:02 -0700 Subject: allow the addition of the pen tool to the timeline --- js/tools/PenTool.js | 4 ++++ 1 file changed, 4 insertions(+) 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, { var newCanvas = null; newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas, true); + //note that we set the notify event to false because we send the event separately at end of this code block ElementMediator.addElements(newCanvas, elementModel.data, false); // create all the GL stuff @@ -602,6 +603,9 @@ exports.PenTool = Montage.create(ShapeTool, { // TODO - update the shape's info only. shapeModel will likely need an array of shapes. } + //now send the event that will add this canvas to the timeline + NJevent("elementAdded", newCanvas); + if(newCanvas.elementModel.isShape) //todo why is this not true for the path canvas? { this.application.ninja.selectionController.selectElement(newCanvas); -- cgit v1.2.3