diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/LineTool.js | 4 | ||||
-rwxr-xr-x | js/tools/OvalTool.js | 12 | ||||
-rwxr-xr-x | js/tools/RectTool.js | 12 | ||||
-rwxr-xr-x | js/tools/TextTool.js | 1 |
4 files changed, 24 insertions, 5 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 2dbaf593..41458d01 100755 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -268,8 +268,12 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
268 | { | 268 | { |
269 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 269 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
270 | } | 270 | } |
271 | if (strokeMaterial && this.options.stroke.color && (strokeMaterial.gradientType === this.options.stroke.color.gradientMode)) { | ||
272 | strokeColor = {gradientMode:strokeMaterial.gradientType, color:this.options.stroke.color.stops}; | ||
273 | } else { | ||
271 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | 274 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; |
272 | } | 275 | } |
276 | } | ||
273 | 277 | ||
274 | var world = this.getGLWorld(canvas, this.options.use3D); | 278 | var world = this.getGLWorld(canvas, this.options.use3D); |
275 | 279 | ||
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 4c78973d..970dc453 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); |
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 82db3c7a..a5cc49e2 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -98,14 +98,22 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
98 | { | 98 | { |
99 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 99 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
100 | } | 100 | } |
101 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | 101 | if (strokeMaterial && this.options.stroke.color && (strokeMaterial.gradientType === this.options.stroke.color.gradientMode)) { |
102 | strokeColor = {gradientMode:strokeMaterial.gradientType, color:this.options.stroke.color.stops}; | ||
103 | } else { | ||
104 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | ||
105 | } | ||
102 | 106 | ||
103 | fillM = this.options.fillMaterial; | 107 | fillM = this.options.fillMaterial; |
104 | if(fillM) | 108 | if(fillM) |
105 | { | 109 | { |
106 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 110 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
107 | } | 111 | } |
108 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | 112 | if (fillMaterial && this.options.fill.color && (fillMaterial.gradientType === this.options.fill.color.gradientMode)) { |
113 | fillColor = {gradientMode:fillMaterial.gradientType, color:this.options.fill.color.stops}; | ||
114 | } else { | ||
115 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | ||
116 | } | ||
109 | } | 117 | } |
110 | 118 | ||
111 | var world = this.getGLWorld(canvas, this.options.use3D); | 119 | var world = this.getGLWorld(canvas, this.options.use3D); |
diff --git a/js/tools/TextTool.js b/js/tools/TextTool.js index ce8a79e8..2dbd90f3 100755 --- a/js/tools/TextTool.js +++ b/js/tools/TextTool.js | |||
@@ -192,7 +192,6 @@ exports.TextTool = Montage.create(DrawingTool, { | |||
192 | 192 | ||
193 | if(wasSelected) { | 193 | if(wasSelected) { |
194 | NJevent("enableStageMove"); | 194 | NJevent("enableStageMove"); |
195 | this.options.defineInitialProperties(); | ||
196 | this.application.ninja.stage.stageDeps.snapManager.setupDragPlaneFromPlane( workingPlane ); | 195 | this.application.ninja.stage.stageDeps.snapManager.setupDragPlaneFromPlane( workingPlane ); |
197 | } else { | 196 | } else { |
198 | this.selectedElement = null; | 197 | this.selectedElement = null; |