diff options
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index e798d1a7..f1e33205 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -54,14 +54,22 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
54 | { | 54 | { |
55 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 55 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
56 | } | 56 | } |
57 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | 57 | if (strokeMaterial && this.options.stroke.color && (strokeMaterial.gradientType === this.options.stroke.color.gradientMode)) { |
58 | strokeColor = {gradientMode:strokeMaterial.gradientType, color:this.options.stroke.color.stops}; | ||
59 | } else { | ||
60 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | ||
61 | } | ||
58 | 62 | ||
59 | fillM = this.options.fillMaterial; | 63 | fillM = this.options.fillMaterial; |
60 | if(fillM) | 64 | if(fillM) |
61 | { | 65 | { |
62 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 66 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
63 | } | 67 | } |
64 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | 68 | if (fillMaterial && this.options.fill.color && (fillMaterial.gradientType === this.options.fill.color.gradientMode)) { |
69 | fillColor = {gradientMode:fillMaterial.gradientType, color:this.options.fill.color.stops}; | ||
70 | } else { | ||
71 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | ||
72 | } | ||
65 | } | 73 | } |
66 | 74 | ||
67 | var world = this.getGLWorld(canvas, this.options.use3D); | 75 | var world = this.getGLWorld(canvas, this.options.use3D); |