aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-29 16:45:40 -0800
committerNivesh Rajbhandari2012-02-29 16:45:40 -0800
commitf04cc0146d8f7573628678613a99c270116768e4 (patch)
treec8dee41bc60b5f1c4560f3a71514538b35905fe5 /js/tools/LineTool.js
parentb09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff)
downloadninja-f04cc0146d8f7573628678613a99c270116768e4.tar.gz
Last-used material (instead of FlatMaterial) is applied to shape when turning on use WebGL checkbox in the PI.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-xjs/tools/LineTool.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 0a7c0534..32572af1 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -206,10 +206,13 @@ exports.LineTool = Montage.create(ShapeTool, {
206 // for default stroke and fill/no materials 206 // for default stroke and fill/no materials
207 var strokeMaterial = null; 207 var strokeMaterial = null;
208 208
209 var strokeM = this.options.strokeMaterial; 209 if(this.options.use3D)
210 if(strokeM)
211 { 210 {
212 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); 211 var strokeM = this.options.strokeMaterial;
212 if(strokeM)
213 {
214 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM));
215 }
213 } 216 }
214 217
215 var world = this.getGLWorld(canvas, this.options.use3D); 218 var world = this.getGLWorld(canvas, this.options.use3D);