aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-03 09:42:08 -0700
committerNivesh Rajbhandari2012-05-03 09:42:08 -0700
commit20c0d7c1b6e7544da2aee3ade08b73883cd458c1 (patch)
tree9917be0af29b0d9a346d525a720473007192c3f1 /js/tools
parent8eac5582b72115969a9f915f4303535c22018033 (diff)
downloadninja-20c0d7c1b6e7544da2aee3ade08b73883cd458c1.tar.gz
Updated hard-coded linear and radial gradients to use the color values in Linear/RadialGradientMaterials.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/OvalTool.js4
-rwxr-xr-xjs/tools/RectTool.js4
3 files changed, 5 insertions, 5 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 3e9167fd..61971c33 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -225,7 +225,7 @@ exports.LineTool = Montage.create(ShapeTool, {
225 { 225 {
226 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 226 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
227 } 227 }
228 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 228 strokeColor = ShapesController.getMaterialColor(strokeMaterial) || strokeColor;
229 } 229 }
230 230
231 var world = this.getGLWorld(canvas, this.options.use3D); 231 var world = this.getGLWorld(canvas, this.options.use3D);
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index 6edec811..f06fadb9 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 0c14a559..5865f00d 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);