diff options
author | Valerio Virgillito | 2012-03-02 15:45:35 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-03-02 15:45:35 -0800 |
commit | dced508bb19a7bcd467ff1b86b5df5bbec4be794 (patch) | |
tree | 090b724123be441ce379e6c0f0bc12540fee0d5c /js/tools/RectTool.js | |
parent | 0aeb400070762cf01d83cf9f9ee25a5595098b7f (diff) | |
parent | cc772ef3333ed419d269a2bda7aea5b0150a7bd9 (diff) | |
download | ninja-dced508bb19a7bcd467ff1b86b5df5bbec4be794.tar.gz |
Merge pull request #92 from mqg734/WebGLFixes
Selection Tool Fixes for elements flying off into space when they overlap
Diffstat (limited to 'js/tools/RectTool.js')
-rwxr-xr-x | js/tools/RectTool.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 31ac7faa..5e148de3 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -62,16 +62,19 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
62 | var strokeMaterial = null; | 62 | var strokeMaterial = null; |
63 | var fillMaterial = null; | 63 | var fillMaterial = null; |
64 | 64 | ||
65 | var strokeM = this.options.strokeMaterial; | 65 | if(this.options.use3D) |
66 | if(strokeM) | ||
67 | { | 66 | { |
68 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | 67 | var strokeM = this.options.strokeMaterial; |
69 | } | 68 | if(strokeM) |
69 | { | ||
70 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | ||
71 | } | ||
70 | 72 | ||
71 | var fillM = this.options.fillMaterial; | 73 | var fillM = this.options.fillMaterial; |
72 | if(fillM) | 74 | if(fillM) |
73 | { | 75 | { |
74 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); | 76 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); |
77 | } | ||
75 | } | 78 | } |
76 | 79 | ||
77 | var world = this.getGLWorld(canvas, this.options.use3D); | 80 | var world = this.getGLWorld(canvas, this.options.use3D); |