aboutsummaryrefslogtreecommitdiff
path: root/js/tools/OvalTool.js
diff options
context:
space:
mode:
authorhwc4872012-02-07 14:42:51 -0800
committerhwc4872012-02-07 14:42:51 -0800
commit6173fe8440152b1e4c63834a6b4dc7573d532339 (patch)
treed23449204ae7f23cb9bab09836d126e90c30484b /js/tools/OvalTool.js
parent2d4da18a778471b02e188ad668752e331ee76127 (diff)
parentaec849d91e4b697d496b9ede28b5d89cf2283781 (diff)
downloadninja-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/OvalTool.js')
-rw-r--r--js/tools/OvalTool.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index 446c6754..14655312 100644
--- a/js/tools/OvalTool.js
+++ b/js/tools/OvalTool.js
@@ -43,16 +43,16 @@ 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 strokeIndex = parseInt(this.options.strokeMaterial); 46 var strokeM = this.options.strokeMaterial;
47 if(strokeIndex > 0) 47 if(strokeM)
48 { 48 {
49 strokeMaterial = Object.create(MaterialsLibrary.getMaterialAt(strokeIndex-1)); 49 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM));
50 } 50 }
51 51
52 var fillIndex = parseInt(this.options.fillMaterial); 52 var fillM = this.options.fillMaterial;
53 if(fillIndex > 0) 53 if(fillM)
54 { 54 {
55 fillMaterial = Object.create(MaterialsLibrary.getMaterialAt(fillIndex-1)); 55 fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM));
56 } 56 }
57 57
58 58
@@ -88,8 +88,6 @@ exports.OvalTool = Montage.create(ShapeTool, {
88 88
89 canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; 89 canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial;
90 canvas.elementModel.shapeModel.fillMaterial = fillMaterial; 90 canvas.elementModel.shapeModel.fillMaterial = fillMaterial;
91 canvas.elementModel.shapeModel.strokeMaterialIndex = strokeIndex;
92 canvas.elementModel.shapeModel.fillMaterialIndex = fillIndex;
93 91
94 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; 92 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex;
95 canvas.elementModel.shapeModel.strokeStyle = strokeStyle; 93 canvas.elementModel.shapeModel.strokeStyle = strokeStyle;