aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorPushkar Joshi2012-06-11 14:07:13 -0700
committerPushkar Joshi2012-06-11 14:07:13 -0700
commit71bc93ad0d53a77d70c688b2b3aacf694dd1de91 (patch)
treea432a4652bf7c96aea72a22bf27946eeee8fc4a5 /js/tools
parent76db3eb0aa4ffe9e75812db570c793e9f852f853 (diff)
parent756cbfad2b98b300af8db3793aa21718b88dd950 (diff)
downloadninja-71bc93ad0d53a77d70c688b2b3aacf694dd1de91.tar.gz
Merge branch 'master' into brushtool
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/BrushTool.js1
-rwxr-xr-xjs/tools/EyedropperTool.js1
-rwxr-xr-xjs/tools/LineTool.js1
-rwxr-xr-xjs/tools/PenTool.js1
-rwxr-xr-xjs/tools/ShapeTool.js1
-rwxr-xr-xjs/tools/TagTool.js3
6 files changed, 0 insertions, 8 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index db369a88..5d983a93 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -378,7 +378,6 @@ exports.BrushTool = Montage.create(ShapeTool, {
378 378
379 if (!canvas) { 379 if (!canvas) {
380 var newCanvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument); 380 var newCanvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument);
381 document.application.njUtils.createModelWithShape(newCanvas, "Brushstroke");
382 var styles = document.application.njUtils.stylesFromDraw(newCanvas, w, h, {midPt: midPt, planeMat: planeMat}); 381 var styles = document.application.njUtils.stylesFromDraw(newCanvas, w, h, {midPt: midPt, planeMat: planeMat});
383 this.application.ninja.elementMediator.addElements(newCanvas, styles, false); 382 this.application.ninja.elementMediator.addElements(newCanvas, styles, false);
384 383
diff --git a/js/tools/EyedropperTool.js b/js/tools/EyedropperTool.js
index 6678e498..6a56004d 100755
--- a/js/tools/EyedropperTool.js
+++ b/js/tools/EyedropperTool.js
@@ -376,7 +376,6 @@ exports.EyedropperTool = Montage.create(toolBase, {
376 if(worldData) 376 if(worldData)
377 { 377 {
378 this._webGlDataCanvas = njModule.NJUtils.make("canvas", {"data-RDGE-id": njModule.NJUtils.generateRandom()}, this.application.ninja.currentDocument); 378 this._webGlDataCanvas = njModule.NJUtils.make("canvas", {"data-RDGE-id": njModule.NJUtils.generateRandom()}, this.application.ninja.currentDocument);
379 njModule.NJUtils.createModelWithShape(this._webGlDataCanvas, "Canvas");
380 this._applyElementStyles(elt, this._webGlDataCanvas, ["display", "position", "width", "height", 379 this._applyElementStyles(elt, this._webGlDataCanvas, ["display", "position", "width", "height",
381 "-webkit-transform", "-webkit-transform-style"]); 380 "-webkit-transform", "-webkit-transform-style"]);
382 this._webGlDataCanvas.style.left = eltCoords[0] + "px"; 381 this._webGlDataCanvas.style.left = eltCoords[0] + "px";
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 327d0054..40475908 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -85,7 +85,6 @@ exports.LineTool = Montage.create(ShapeTool, {
85 } 85 }
86 86
87 canvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument); 87 canvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument);
88 document.application.njUtils.createModelWithShape(canvas, "Line");
89 88
90 var styles = document.application.njUtils.stylesFromDraw(canvas, w, h, this.drawData); 89 var styles = document.application.njUtils.stylesFromDraw(canvas, w, h, this.drawData);
91 this.application.ninja.elementMediator.addElements(canvas, styles); 90 this.application.ninja.elementMediator.addElements(canvas, styles);
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 4daae420..e296d0e5 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -695,7 +695,6 @@ exports.PenTool = Montage.create(ShapeTool, {
695 if (!canvas) { 695 if (!canvas) {
696 this._doesSelectionChangeNeedHandling = false; //this will ignore the selection change event triggered by the new canvas 696 this._doesSelectionChangeNeedHandling = false; //this will ignore the selection change event triggered by the new canvas
697 var newCanvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument); 697 var newCanvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument);
698 document.application.njUtils.createModelWithShape(newCanvas, "Subpath");
699 var styles = document.application.njUtils.stylesFromDraw(newCanvas, parseInt(w), parseInt(h), {midPt: midPt, planeMat: planeMat}); 698 var styles = document.application.njUtils.stylesFromDraw(newCanvas, parseInt(w), parseInt(h), {midPt: midPt, planeMat: planeMat});
700 this.application.ninja.elementMediator.addElements(newCanvas, styles, false); 699 this.application.ninja.elementMediator.addElements(newCanvas, styles, false);
701 700
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js
index 8886285d..03ddc391 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -65,7 +65,6 @@ exports.ShapeTool = Montage.create(DrawingTool, {
65 if( (w > 0) && (h > 0) ) { 65 if( (w > 0) && (h > 0) ) {
66 if(!this._useExistingCanvas()) { 66 if(!this._useExistingCanvas()) {
67 canvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument); 67 canvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument);
68 document.application.njUtils.createModelWithShape(canvas);
69 68
70 var styles = document.application.njUtils.stylesFromDraw(canvas, w, h, this.drawData); 69 var styles = document.application.njUtils.stylesFromDraw(canvas, w, h, this.drawData);
71 this.application.ninja.elementMediator.addElements(canvas, styles); 70 this.application.ninja.elementMediator.addElements(canvas, styles);
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index 4ce27e36..508e2a85 100755
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -90,9 +90,6 @@ exports.TagTool = Montage.create(DrawingTool, {
90 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument); 90 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument);
91 } 91 }
92 92
93 // Create the model
94 document.application.njUtils.createModel(element);
95
96 // Create the styles 93 // Create the styles
97 styles = document.application.njUtils.stylesFromDraw(element, ~~drawData.width, ~~drawData.height, drawData); 94 styles = document.application.njUtils.stylesFromDraw(element, ~~drawData.width, ~~drawData.height, drawData);
98 95