diff options
author | Armen Kesablyan | 2012-07-02 13:19:20 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-07-02 13:19:20 -0700 |
commit | 526b9d76686323f488f1b26175440172b715d808 (patch) | |
tree | 47fc6bd90715b403a08d08a48a86f4d24da1ba29 /js/tools/LineTool.js | |
parent | b194664df7e01aaeb8d1e7220a6de0e7f879f1db (diff) | |
parent | 12de4e49a309e210c13eb40b2ffa158ef2eb54a7 (diff) | |
download | ninja-526b9d76686323f488f1b26175440172b715d808.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-x | js/tools/LineTool.js | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 07429bc0..413c0302 100755 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -44,10 +44,16 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | this._strokeSize = ShapesController.GetValueInPixels(this.options.strokeSize.value, this.options.strokeSize.units, null); | 46 | this._strokeSize = ShapesController.GetValueInPixels(this.options.strokeSize.value, this.options.strokeSize.units, null); |
47 | if (this.options.stroke.color) | 47 | if (this.options.stroke.color) { |
48 | this._strokeColor = this.options.stroke.color.css; | 48 | if( (this.options.stroke.colorMode === "gradient") || (this.options.stroke.colorMode === "nocolor") ) { |
49 | else | 49 | this._strokeColor = [0,0,0,1]; |
50 | this._strokeColor = [0,0,0,1]; | 50 | } else { |
51 | this._strokeColor = this.options.stroke.color.css; | ||
52 | } | ||
53 | } else { | ||
54 | this._strokeColor = [0,0,0,1]; | ||
55 | } | ||
56 | |||
51 | this.startDraw(event); | 57 | this.startDraw(event); |
52 | } | 58 | } |
53 | }, | 59 | }, |
@@ -229,10 +235,11 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
229 | var strokeColor = this.options.stroke.webGlColor; | 235 | var strokeColor = this.options.stroke.webGlColor; |
230 | // for default stroke and fill/no materials | 236 | // for default stroke and fill/no materials |
231 | var strokeMaterial = null; | 237 | var strokeMaterial = null; |
238 | var strokeM = null; | ||
232 | 239 | ||
233 | if(this.options.use3D) | 240 | if(this.options.use3D) |
234 | { | 241 | { |
235 | var strokeM = this.options.strokeMaterial; | 242 | strokeM = this.options.strokeMaterial; |
236 | if(strokeM) | 243 | if(strokeM) |
237 | { | 244 | { |
238 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 245 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
@@ -270,6 +277,11 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
270 | // TODO - update the shape's info only. shapeModel will likely need an array of shapes. | 277 | // TODO - update the shape's info only. shapeModel will likely need an array of shapes. |
271 | } | 278 | } |
272 | 279 | ||
280 | // TODO - This needs to be moved into geom obj's init routine instead of here | ||
281 | if(!strokeM) { | ||
282 | this.setColor(canvas, this.options.stroke, false, "lineTool"); | ||
283 | } | ||
284 | |||
273 | if(canvas.elementModel.isShape) | 285 | if(canvas.elementModel.isShape) |
274 | { | 286 | { |
275 | this.application.ninja.selectionController.selectElement(canvas); | 287 | this.application.ninja.selectionController.selectElement(canvas); |