aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/LineTool.js')
-rw-r--r--js/tools/LineTool.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index a0d5a182..99c374a7 100644
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -99,6 +99,7 @@ exports.LineTool = Montage.create(ShapeTool, {
99 } 99 }
100 this.RenderShape(w, h, drawData.planeMat, drawData.midPt, 100 this.RenderShape(w, h, drawData.planeMat, drawData.midPt,
101 canvas, slope, xAdj, yAdj); 101 canvas, slope, xAdj, yAdj);
102 NJevent("elementAdded", canvas);
102 } 103 }
103 104
104 this.endDraw(event); 105 this.endDraw(event);
@@ -202,10 +203,10 @@ exports.LineTool = Montage.create(ShapeTool, {
202 // for default stroke and fill/no materials 203 // for default stroke and fill/no materials
203 var strokeMaterial = null; 204 var strokeMaterial = null;
204 205
205 var strokeIndex = parseInt(this.options.strokeMaterial); 206 var strokeM = this.options.strokeMaterial;
206 if(strokeIndex > 0) 207 if(strokeM)
207 { 208 {
208 strokeMaterial = Object.create(MaterialsLibrary.getMaterialAt(strokeIndex-1)); 209 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM));
209 } 210 }
210 211
211 var world = this.getGLWorld(canvas, this.options.use3D); 212 var world = this.getGLWorld(canvas, this.options.use3D);
@@ -231,12 +232,12 @@ exports.LineTool = Montage.create(ShapeTool, {
231 } 232 }
232 233
233 canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; 234 canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial;
234 canvas.elementModel.shapeModel.strokeMaterialIndex = strokeIndex;
235 235
236 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; 236 canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex;
237 canvas.elementModel.shapeModel.strokeStyle = strokeStyle; 237 canvas.elementModel.shapeModel.strokeStyle = strokeStyle;
238 238
239 canvas.elementModel.shapeModel.GLGeomObj = line; 239 canvas.elementModel.shapeModel.GLGeomObj = line;
240 canvas.elementModel.shapeModel.useWebGl = this.options.use3D;
240 } 241 }
241 else 242 else
242 { 243 {