aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/OvalTool.js4
-rwxr-xr-xjs/tools/RectTool.js4
-rwxr-xr-xjs/tools/TagTool.js2
4 files changed, 7 insertions, 5 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 198d7e69..6621d18b 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -226,7 +226,7 @@ exports.LineTool = Montage.create(ShapeTool, {
226 { 226 {
227 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 227 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
228 } 228 }
229 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 229 strokeColor = ShapesController.getMaterialColor(strokeMaterial) || strokeColor;
230 } 230 }
231 231
232 var world = this.getGLWorld(canvas, this.options.use3D); 232 var world = this.getGLWorld(canvas, this.options.use3D);
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index e9dc66bb..917da538 100755
--- a/js/tools/OvalTool.js
+++ b/js/tools/OvalTool.js
@@ -53,14 +53,14 @@ exports.OvalTool = Montage.create(ShapeTool, {
53 { 53 {
54 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 54 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
55 } 55 }
56 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 56 strokeColor = ShapesController.getMaterialColor(strokeMaterial) || strokeColor;
57 57
58 var fillM = this.options.fillMaterial; 58 var fillM = this.options.fillMaterial;
59 if(fillM) 59 if(fillM)
60 { 60 {
61 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); 61 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM));
62 } 62 }
63 fillColor = ShapesController.getMaterialColor(fillM) || fillColor; 63 fillColor = ShapesController.getMaterialColor(fillMaterial) || fillColor;
64 } 64 }
65 65
66 var world = this.getGLWorld(canvas, this.options.use3D); 66 var world = this.getGLWorld(canvas, this.options.use3D);
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js
index 0a3c8200..a8c57688 100755
--- a/js/tools/RectTool.js
+++ b/js/tools/RectTool.js
@@ -72,14 +72,14 @@ exports.RectTool = Montage.create(ShapeTool, {
72 { 72 {
73 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 73 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
74 } 74 }
75 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 75 strokeColor = ShapesController.getMaterialColor(strokeMaterial) || strokeColor;
76 76
77 var fillM = this.options.fillMaterial; 77 var fillM = this.options.fillMaterial;
78 if(fillM) 78 if(fillM)
79 { 79 {
80 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); 80 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM));
81 } 81 }
82 fillColor = ShapesController.getMaterialColor(fillM) || fillColor; 82 fillColor = ShapesController.getMaterialColor(fillMaterial) || fillColor;
83 } 83 }
84 84
85 var world = this.getGLWorld(canvas, this.options.use3D); 85 var world = this.getGLWorld(canvas, this.options.use3D);
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index 5e9c792b..43a774e1 100755
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -82,6 +82,8 @@ exports.TagTool = Montage.create(DrawingTool, {
82 // Create the element 82 // Create the element
83 if(this.options.selectedElement === "custom") { 83 if(this.options.selectedElement === "custom") {
84 element = document.application.njUtils.make(this.options.customName.value, null, this.application.ninja.currentDocument); 84 element = document.application.njUtils.make(this.options.customName.value, null, this.application.ninja.currentDocument);
85 if (!NJUtils) NJUtils = require("js/lib/NJUtils").NJUtils;
86
85 } else { 87 } else {
86 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument); 88 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument);
87 } 89 }