diff options
author | John Mayhew | 2012-05-07 16:30:19 -0700 |
---|---|---|
committer | John Mayhew | 2012-05-07 16:30:19 -0700 |
commit | db4ba95f50148198759dde503ec1c778184d9dbe (patch) | |
tree | 8b79ad58108af2f17d15abc8cdc33d35229ab20d /js/tools/PenTool.js | |
parent | 843d8ea8ee58a54bcb71d7b28dbf78fae153b491 (diff) | |
parent | 526e423e4a2734c2b139af23911e912452a4443f (diff) | |
download | ninja-db4ba95f50148198759dde503ec1c778184d9dbe.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts:
js/components/layout/tools-list.reel/tools-list.html
js/components/layout/tools-properties.reel/tools-properties.html
js/components/tools-properties/brush-properties.reel/brush-properties.html
js/components/tools-properties/fill-properties.reel/fill-properties.html
js/components/tools-properties/pen-properties.reel/pen-properties.html
js/components/tools-properties/pencil-properties.reel/pencil-properties.html
js/components/tools-properties/selection-properties.reel/selection-properties.html
js/components/tools-properties/shape-properties.reel/shape-properties.html
js/components/tools-properties/tag-properties.reel/tag-properties.html
js/components/tools-properties/text-properties.reel/text-properties.html
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-x | js/tools/PenTool.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 83d0c8d2..e70bed27 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); |