diff options
author | John Mayhew | 2012-05-03 15:11:56 -0700 |
---|---|---|
committer | John Mayhew | 2012-05-03 15:11:56 -0700 |
commit | 1a759361b82127f9d5c1428dc889fffdf2daaf86 (patch) | |
tree | 92e62aa215418d864e5224797a974cb9841d4b90 /js/tools | |
parent | 6b1a6994d98a18b45016b97ac8d81483109a586c (diff) | |
download | ninja-1a759361b82127f9d5c1428dc889fffdf2daaf86.tar.gz |
First round of moving color chips into the sub tools. Shape and Pen tool now have chips in the sub tool bar. Still need to complete adding chips to the Brush tool and finalizing the subtool bar layout to our spec for all of the subtools.
Diffstat (limited to 'js/tools')
-rw-r--r-- | js/tools/BrushTool.js | 2 | ||||
-rwxr-xr-x | js/tools/LineTool.js | 6 | ||||
-rwxr-xr-x | js/tools/OvalTool.js | 4 | ||||
-rwxr-xr-x | js/tools/PenTool.js | 4 | ||||
-rwxr-xr-x | js/tools/RectTool.js | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index ded56ecc..7e5e0630 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js | |||
@@ -132,7 +132,7 @@ exports.BrushTool = Montage.create(ShapeTool, { | |||
132 | if (this._selectedBrushStroke === null){ | 132 | if (this._selectedBrushStroke === null){ |
133 | this._selectedBrushStroke = new BrushStroke(); | 133 | this._selectedBrushStroke = new BrushStroke(); |
134 | var colorArray=[0,0,0,0]; | 134 | var colorArray=[0,0,0,0]; |
135 | var color = this.application.ninja.colorController.colorToolbar.fill.color; | 135 | var color = this.options.fill.color; |
136 | if (color){ | 136 | if (color){ |
137 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; | 137 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; |
138 | } else { | 138 | } else { |
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 3e9167fd..92352880 100755 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -44,8 +44,8 @@ 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.application.ninja.colorController.colorToolbar.stroke.color) | 47 | if (this.options.stroke.color) |
48 | this._strokeColor = this.application.ninja.colorController.colorToolbar.stroke.color.css; | 48 | this._strokeColor = this.options.stroke.color.css; |
49 | else | 49 | else |
50 | this._strokeColor = [0,0,0,1]; | 50 | this._strokeColor = [0,0,0,1]; |
51 | this.startDraw(event); | 51 | this.startDraw(event); |
@@ -214,7 +214,7 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
214 | var left = Math.round(midPt[0] - 0.5*w); | 214 | var left = Math.round(midPt[0] - 0.5*w); |
215 | var top = Math.round(midPt[1] - 0.5*h); | 215 | var top = Math.round(midPt[1] - 0.5*h); |
216 | 216 | ||
217 | var strokeColor = this.application.ninja.colorController.colorToolbar.stroke.webGlColor; | 217 | var strokeColor = this.options.stroke.webGlColor; |
218 | // for default stroke and fill/no materials | 218 | // for default stroke and fill/no materials |
219 | var strokeMaterial = null; | 219 | var strokeMaterial = null; |
220 | 220 | ||
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 6edec811..f1da3a46 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -39,8 +39,8 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
39 | 39 | ||
40 | var innerRadius = this.options.innerRadius.value / 100; | 40 | var innerRadius = this.options.innerRadius.value / 100; |
41 | 41 | ||
42 | var strokeColor = this.application.ninja.colorController.colorToolbar.stroke.webGlColor; | 42 | var strokeColor = this.options.stroke.webGlColor; |
43 | var fillColor = this.application.ninja.colorController.colorToolbar.fill.webGlColor; | 43 | var fillColor = this.options.fill.webGlColor; |
44 | 44 | ||
45 | // for default stroke and fill/no materials | 45 | // for default stroke and fill/no materials |
46 | var strokeMaterial = null; | 46 | var strokeMaterial = null; |
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 8ecc9f79..83d0c8d2 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js | |||
@@ -240,7 +240,7 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
240 | this._selectedSubpath.setStrokeWidth(strokeSize); | 240 | this._selectedSubpath.setStrokeWidth(strokeSize); |
241 | 241 | ||
242 | var colorArray=[]; | 242 | var colorArray=[]; |
243 | var color = this.application.ninja.colorController.colorToolbar.stroke.color; | 243 | var color = this.options.stroke.color; |
244 | if (color){ | 244 | if (color){ |
245 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; | 245 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; |
246 | }else { | 246 | }else { |
@@ -248,7 +248,7 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
248 | } | 248 | } |
249 | this._selectedSubpath.setStrokeColor(colorArray); | 249 | this._selectedSubpath.setStrokeColor(colorArray); |
250 | 250 | ||
251 | color = this.application.ninja.colorController.colorToolbar.fill.color; | 251 | color = this.options.fill.color; |
252 | if (color){ | 252 | if (color){ |
253 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; | 253 | colorArray = [color.r/255, color.g/255, color.b/255, color.a]; |
254 | } else { | 254 | } else { |
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 0c14a559..d4951db8 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -59,8 +59,8 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
59 | var blRadius = ShapesController.GetValueInPixels(this.options.BLRadiusControl.value, this.options.BLRadiusControl.units, h); | 59 | var blRadius = ShapesController.GetValueInPixels(this.options.BLRadiusControl.value, this.options.BLRadiusControl.units, h); |
60 | var brRadius = ShapesController.GetValueInPixels(this.options.BRRadiusControl.value, this.options.BRRadiusControl.units, h); | 60 | var brRadius = ShapesController.GetValueInPixels(this.options.BRRadiusControl.value, this.options.BRRadiusControl.units, h); |
61 | 61 | ||
62 | var strokeColor = this.application.ninja.colorController.colorToolbar.stroke.webGlColor; | 62 | var strokeColor = this.options.stroke.webGlColor; |
63 | var fillColor = this.application.ninja.colorController.colorToolbar.fill.webGlColor; | 63 | var fillColor = this.options.fill.webGlColor; |
64 | // for default stroke and fill/no materials | 64 | // for default stroke and fill/no materials |
65 | var strokeMaterial = null; | 65 | var strokeMaterial = null; |
66 | var fillMaterial = null; | 66 | var fillMaterial = null; |