aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-17 14:49:18 -0700
committerPushkar Joshi2012-04-17 14:49:18 -0700
commitdf903a01e14134cadf109b733d09c6eadfa3966b (patch)
tree2351f1c05b2f852053fa0be533072088a9ad4e7c /js/tools/LineTool.js
parent036cf034e124dbc1f4893e90f7c6d240904a3faf (diff)
parentcacb4a21825818af392c2949967b0f3c1df509c5 (diff)
downloadninja-df903a01e14134cadf109b733d09c6eadfa3966b.tar.gz
Merge branch 'master' into pentool
Conflicts: js/tools/PenTool.js
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 {