diff options
author | Armen Kesablyan | 2012-02-13 11:59:19 -0800 |
---|---|---|
committer | Armen Kesablyan | 2012-02-13 11:59:19 -0800 |
commit | 90d0c8c0e98d062c628c061fe5765ce991fda409 (patch) | |
tree | 9780e9dcf475bf319f3cacc1a1ad52fcf9f133af /js/tools/OvalTool.js | |
parent | 8110e01dc5093ac6baf621103dcaa5f769e5be92 (diff) | |
parent | e142611e22718b1f1d1696902ad9161ec5f33f98 (diff) | |
download | ninja-90d0c8c0e98d062c628c061fe5765ce991fda409.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Conflicts:
css/ninja.css
js/stage/stage.reel/stage.html
js/tools/TextTool.js
node_modules/labs/rich-text-editor.reel/rich-text-editor.css
node_modules/labs/rich-text-editor.reel/rich-text-editor.html
node_modules/labs/rich-text-editor.reel/rich-text-editor.js
node_modules/labs/rich-text-editor.reel/rich-text-resizer.js
node_modules/labs/rich-text-editor.reel/rich-text-sanitizer.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/tools/OvalTool.js')
-rw-r--r-- | js/tools/OvalTool.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 2fa5411b..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,13 +88,12 @@ 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; |
96 | 94 | ||
97 | canvas.elementModel.shapeModel.GLGeomObj = oval; | 95 | canvas.elementModel.shapeModel.GLGeomObj = oval; |
96 | canvas.elementModel.shapeModel.useWebGl = this.options.use3D; | ||
98 | } | 97 | } |
99 | else | 98 | else |
100 | { | 99 | { |