aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
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 {