aboutsummaryrefslogtreecommitdiff
path: root/js/tools/OvalTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-xjs/tools/OvalTool.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js
index 94e4745e..44598ed7 100755
--- a/js/tools/OvalTool.js
+++ b/js/tools/OvalTool.js
@@ -78,14 +78,22 @@ exports.OvalTool = Montage.create(ShapeTool, {
78 { 78 {
79 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 79 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
80 } 80 }
81 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 81 if (strokeMaterial && this.options.stroke.color && (strokeMaterial.gradientType === this.options.stroke.color.gradientMode)) {
82 strokeColor = {gradientMode:strokeMaterial.gradientType, color:this.options.stroke.color.stops};
83 } else {
84 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor;
85 }
82 86
83 fillM = this.options.fillMaterial; 87 fillM = this.options.fillMaterial;
84 if(fillM) 88 if(fillM)
85 { 89 {
86 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); 90 fillMaterial = Object.create(MaterialsModel.getMaterial(fillM));
87 } 91 }
88 fillColor = ShapesController.getMaterialColor(fillM) || fillColor; 92 if (fillMaterial && this.options.fill.color && (fillMaterial.gradientType === this.options.fill.color.gradientMode)) {
93 fillColor = {gradientMode:fillMaterial.gradientType, color:this.options.fill.color.stops};
94 } else {
95 fillColor = ShapesController.getMaterialColor(fillM) || fillColor;
96 }
89 } 97 }
90 98
91 var world = this.getGLWorld(canvas, this.options.use3D); 99 var world = this.getGLWorld(canvas, this.options.use3D);