diff options
author | Pushkar Joshi | 2012-03-05 14:49:05 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-03-05 14:49:05 -0800 |
commit | db82be91f767a07b7cb8c97ca3d9f4c4d75bc9ae (patch) | |
tree | 21e0ee213e24de67eb9c4cddfc5f3069c2257aae /js/tools/OvalTool.js | |
parent | 4419209a1fd850ab468209b562b66b0242b42a9c (diff) | |
parent | 13f52cf0c74f53a919fa864f86669e8155f82961 (diff) | |
download | ninja-db82be91f767a07b7cb8c97ca3d9f4c4d75bc9ae.tar.gz |
Merge branch 'master' into brushtool
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 20 |
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); |