diff options
author | hwc487 | 2012-02-07 14:42:51 -0800 |
---|---|---|
committer | hwc487 | 2012-02-07 14:42:51 -0800 |
commit | 6173fe8440152b1e4c63834a6b4dc7573d532339 (patch) | |
tree | d23449204ae7f23cb9bab09836d126e90c30484b /js/tools/RectTool.js | |
parent | 2d4da18a778471b02e188ad668752e331ee76127 (diff) | |
parent | aec849d91e4b697d496b9ede28b5d89cf2283781 (diff) | |
download | ninja-6173fe8440152b1e4c63834a6b4dc7573d532339.tar.gz |
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
Conflicts:
js/helper-classes/RDGE/GLRectangle.js
js/helper-classes/RDGE/GLWorld.js
js/helper-classes/RDGE/MaterialsLibrary.js
Diffstat (limited to 'js/tools/RectTool.js')
-rw-r--r-- | js/tools/RectTool.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 6109ee4d..31ac7faa 100644 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -62,16 +62,16 @@ 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 strokeIndex = parseInt(this.options.strokeMaterial); | 65 | var strokeM = this.options.strokeMaterial; |
66 | if(strokeIndex > 0) | 66 | if(strokeM) |
67 | { | 67 | { |
68 | strokeMaterial = Object.create(MaterialsLibrary.getMaterialAt(strokeIndex-1)); | 68 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); |
69 | } | 69 | } |
70 | 70 | ||
71 | var fillIndex = parseInt(this.options.fillMaterial); | 71 | var fillM = this.options.fillMaterial; |
72 | if(fillIndex > 0) | 72 | if(fillM) |
73 | { | 73 | { |
74 | fillMaterial = Object.create(MaterialsLibrary.getMaterialAt(fillIndex-1)); | 74 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); |
75 | } | 75 | } |
76 | 76 | ||
77 | var world = this.getGLWorld(canvas, this.options.use3D); | 77 | var world = this.getGLWorld(canvas, this.options.use3D); |
@@ -110,8 +110,6 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
110 | 110 | ||
111 | canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; | 111 | canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; |
112 | canvas.elementModel.shapeModel.fillMaterial = fillMaterial; | 112 | canvas.elementModel.shapeModel.fillMaterial = fillMaterial; |
113 | canvas.elementModel.shapeModel.strokeMaterialIndex = strokeIndex; | ||
114 | canvas.elementModel.shapeModel.fillMaterialIndex = fillIndex; | ||
115 | 113 | ||
116 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; | 114 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; |
117 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 115 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |