aboutsummaryrefslogtreecommitdiff
path: root/js/tools/PenTool.js
diff options
context:
space:
mode:
authorJonathan Duran2012-05-09 09:58:27 -0700
committerJonathan Duran2012-05-09 09:58:27 -0700
commit48a2a800155fd2d608fb7191c0180cd8f625cd44 (patch)
tree899f9cf1b09a01bc073f92ab498236aed80b38ec /js/tools/PenTool.js
parent2ea8a62835f4c20efff2623306e7205e6f5bf0ba (diff)
parentd220c02e246b30509b28a47fa04916ca2b8122e4 (diff)
downloadninja-48a2a800155fd2d608fb7191c0180cd8f625cd44.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts: js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-xjs/tools/PenTool.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 8ecc9f79..16990ca7 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -557,17 +557,16 @@ exports.PenTool = Montage.create(ShapeTool, {
557 return; 557 return;
558 } 558 }
559 559
560 w= Math.round(w); 560 w = Math.round(w);
561 h = Math.round(h); 561 h = Math.round(h);
562 var left = Math.round(midPt[0] - 0.5 * w); 562 var left = Math.round(midPt[0] - 0.5 * w);
563 var top = Math.round(midPt[1] - 0.5 * h); 563 var top = Math.round(midPt[1] - 0.5 * h);
564 564
565 if (!canvas) { 565 if (!canvas) {
566 var newCanvas = null; 566 var newCanvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument);
567 newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); 567 document.application.njUtils.createModelWithShape(newCanvas, "Subpath");
568 var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas, true); 568 var styles = document.application.njUtils.stylesFromDraw(newCanvas, parseInt(w), parseInt(h), {midPt: midPt, planeMat: planeMat});
569 //note that we set the notify event to false because we send the event separately at end of this code block 569 this.application.ninja.elementMediator.addElements(newCanvas, styles, false);
570 ElementMediator.addElements(newCanvas, elementModel.data, false);
571 570
572 // create all the GL stuff 571 // create all the GL stuff
573 var world = this.getGLWorld(newCanvas, this._useWebGL);//this.options.use3D);//this.CreateGLWorld(planeMat, midPt, newCanvas, this._useWebGL);//fillMaterial, strokeMaterial); 572 var world = this.getGLWorld(newCanvas, this._useWebGL);//this.options.use3D);//this.CreateGLWorld(planeMat, midPt, newCanvas, this._useWebGL);//fillMaterial, strokeMaterial);