From 4b8eb7442b41db7e06b639ba4a31bb7664209159 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 3 Feb 2012 15:23:08 -0800 Subject: Update element planes after shapes are created so stage grid updates. Signed-off-by: Nivesh Rajbhandari --- js/tools/LineTool.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/tools/LineTool.js') diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index a0d5a182..17157f23 100644 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js @@ -99,6 +99,7 @@ exports.LineTool = Montage.create(ShapeTool, { } this.RenderShape(w, h, drawData.planeMat, drawData.midPt, canvas, slope, xAdj, yAdj); + NJevent("elementAdded", canvas); } this.endDraw(event); -- cgit v1.2.3 From 486d9a31a85dd833a1c798049a00403756703034 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 6 Feb 2012 11:35:49 -0800 Subject: Support use WebGL checkbox in the PI. Signed-off-by: Nivesh Rajbhandari --- js/tools/LineTool.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/tools/LineTool.js') diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 17157f23..6a948fd8 100644 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js @@ -238,6 +238,7 @@ exports.LineTool = Montage.create(ShapeTool, { canvas.elementModel.shapeModel.strokeStyle = strokeStyle; canvas.elementModel.shapeModel.GLGeomObj = line; + canvas.elementModel.shapeModel.useWebGl = this.options.use3D; } else { -- cgit v1.2.3 From 486842239c71e7964f38a09aacda4970f2a82e1a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 10:58:14 -0800 Subject: Updated tools and PI to get/set materials by binding to appModel's materials property. This requires us to add FlatMaterial to the list of materials in the MaterialsLibrary. Signed-off-by: Nivesh Rajbhandari --- js/tools/LineTool.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'js/tools/LineTool.js') diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 6a948fd8..99c374a7 100644 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js @@ -203,10 +203,10 @@ exports.LineTool = Montage.create(ShapeTool, { // for default stroke and fill/no materials var strokeMaterial = null; - var strokeIndex = parseInt(this.options.strokeMaterial); - if(strokeIndex > 0) + var strokeM = this.options.strokeMaterial; + if(strokeM) { - strokeMaterial = Object.create(MaterialsLibrary.getMaterialAt(strokeIndex-1)); + strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); } var world = this.getGLWorld(canvas, this.options.use3D); @@ -232,7 +232,6 @@ exports.LineTool = Montage.create(ShapeTool, { } canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; - canvas.elementModel.shapeModel.strokeMaterialIndex = strokeIndex; canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; canvas.elementModel.shapeModel.strokeStyle = strokeStyle; -- cgit v1.2.3