diff options
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); |