aboutsummaryrefslogtreecommitdiff
path: root/js/tools/OvalTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-05 14:49:05 -0800
committerPushkar Joshi2012-03-05 14:49:05 -0800
commitdb82be91f767a07b7cb8c97ca3d9f4c4d75bc9ae (patch)
tree21e0ee213e24de67eb9c4cddfc5f3069c2257aae /js/tools/OvalTool.js
parent4419209a1fd850ab468209b562b66b0242b42a9c (diff)
parent13f52cf0c74f53a919fa864f86669e8155f82961 (diff)
downloadninja-db82be91f767a07b7cb8c97ca3d9f4c4d75bc9ae.tar.gz
Merge branch 'master' into brushtool
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-xjs/tools/OvalTool.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index 14655312..911059a7 100755
--- a/js/tools/OvalTool.js
+++ b/js/tools/OvalTool.js
@@ -43,19 +43,21 @@ exports.OvalTool = Montage.create(ShapeTool, {
43 var strokeMaterial = null; 43 var strokeMaterial = null;
44 var fillMaterial = null; 44 var fillMaterial = null;
45 45
46 var strokeM = this.options.strokeMaterial; 46 if(this.options.use3D)
47 if(strokeM)
48 { 47 {
49 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); 48 var strokeM = this.options.strokeMaterial;
50 } 49 if(strokeM)
50 {
51 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM));
52 }
51 53
52 var fillM = this.options.fillMaterial; 54 var fillM = this.options.fillMaterial;
53 if(fillM) 55 if(fillM)
54 { 56 {
55 fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); 57 fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM));
58 }
56 } 59 }
57 60
58
59 var world = this.getGLWorld(canvas, this.options.use3D); 61 var world = this.getGLWorld(canvas, this.options.use3D);
60 62
61 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); 63 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2);