diff options
author | Ananya Sen | 2012-04-17 18:11:55 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-17 18:11:55 -0700 |
commit | 35abad196cc9feb76ef50c1b63032a38233a6d51 (patch) | |
tree | 914689c66d4ab6c6e088b571eade0a0e35082916 /js/tools/OvalTool.js | |
parent | 1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff) | |
parent | 616a8532099fec2a15855eac97cd85cb60c4451c (diff) | |
download | ninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index a10e0bb5..e8e88d1d 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -53,12 +53,14 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
53 | { | 53 | { |
54 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 54 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
55 | } | 55 | } |
56 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | ||
56 | 57 | ||
57 | var fillM = this.options.fillMaterial; | 58 | var fillM = this.options.fillMaterial; |
58 | if(fillM) | 59 | if(fillM) |
59 | { | 60 | { |
60 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 61 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
61 | } | 62 | } |
63 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | ||
62 | } | 64 | } |
63 | 65 | ||
64 | var world = this.getGLWorld(canvas, this.options.use3D); | 66 | var world = this.getGLWorld(canvas, this.options.use3D); |
@@ -78,22 +80,9 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
78 | canvas.elementModel.selection = "Oval"; | 80 | canvas.elementModel.selection = "Oval"; |
79 | canvas.elementModel.pi = "OvalPi"; | 81 | canvas.elementModel.pi = "OvalPi"; |
80 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; | 82 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; |
81 | canvas.elementModel.shapeModel.stroke = strokeColor; | ||
82 | canvas.elementModel.shapeModel.fill = fillColor; | ||
83 | if(strokeColor) | ||
84 | { | ||
85 | canvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; | ||
86 | } | ||
87 | if(fillColor) | ||
88 | { | ||
89 | canvas.elementModel.shapeModel.background = this.application.ninja.colorController.colorToolbar.fill; | ||
90 | } | ||
91 | 83 | ||
92 | canvas.elementModel.shapeModel.innerRadius = this.options.innerRadius.value + " " + this.options.innerRadius.units; | 84 | canvas.elementModel.shapeModel.innerRadius = this.options.innerRadius.value + " " + this.options.innerRadius.units; |
93 | 85 | ||
94 | canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; | ||
95 | canvas.elementModel.shapeModel.fillMaterial = fillMaterial; | ||
96 | |||
97 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; | 86 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; |
98 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 87 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |
99 | 88 | ||