aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-17 18:11:55 -0700
committerAnanya Sen2012-04-17 18:11:55 -0700
commit35abad196cc9feb76ef50c1b63032a38233a6d51 (patch)
tree914689c66d4ab6c6e088b571eade0a0e35082916 /js/tools/LineTool.js
parent1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff)
parent616a8532099fec2a15855eac97cd85cb60c4451c (diff)
downloadninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-xjs/tools/LineTool.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 455f519e..3e9167fd 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -78,7 +78,7 @@ exports.LineTool = Montage.create(ShapeTool, {
78 } 78 }
79 79
80 canvas = NJUtils.makeNJElement("canvas", "Canvas", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); 80 canvas = NJUtils.makeNJElement("canvas", "Canvas", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true);
81 var elementModel = TagTool.makeElement(w, h, drawData.planeMat, drawData.midPt, canvas); 81 var elementModel = TagTool.makeElement(w, h, drawData.planeMat, drawData.midPt, canvas, true);
82 canvas.elementModel.isShape = true; 82 canvas.elementModel.isShape = true;
83 this.application.ninja.elementMediator.addElements(canvas, elementModel.data); 83 this.application.ninja.elementMediator.addElements(canvas, elementModel.data);
84 } else { 84 } else {
@@ -225,6 +225,7 @@ exports.LineTool = Montage.create(ShapeTool, {
225 { 225 {
226 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 226 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
227 } 227 }
228 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor;
228 } 229 }
229 230
230 var world = this.getGLWorld(canvas, this.options.use3D); 231 var world = this.getGLWorld(canvas, this.options.use3D);
@@ -243,19 +244,13 @@ exports.LineTool = Montage.create(ShapeTool, {
243 canvas.elementModel.selection = "Line"; 244 canvas.elementModel.selection = "Line";
244 canvas.elementModel.pi = "LinePi"; 245 canvas.elementModel.pi = "LinePi";
245 canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; 246 canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units;
246 canvas.elementModel.shapeModel.stroke = strokeColor;
247 if(strokeColor)
248 {
249 canvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke;
250 }
251
252 canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial;
253 247
254 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; 248 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex;
255 canvas.elementModel.shapeModel.strokeStyle = strokeStyle; 249 canvas.elementModel.shapeModel.strokeStyle = strokeStyle;
256 250
257 canvas.elementModel.shapeModel.GLGeomObj = line; 251 canvas.elementModel.shapeModel.GLGeomObj = line;
258 canvas.elementModel.shapeModel.useWebGl = this.options.use3D; 252 canvas.elementModel.shapeModel.useWebGl = this.options.use3D;
253 canvas.elementModel.shapeModel.slope = slope;
259 } 254 }
260 else 255 else
261 { 256 {