From 830b011d94d728882286d72e129f7405134957c7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 1 Feb 2012 17:05:07 -0800 Subject: Updated color code in the PI to go through element mediator. Signed-off-by: Nivesh Rajbhandari --- js/tools/LineTool.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/tools/LineTool.js') diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 042ba0b2..a0d5a182 100644 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js @@ -225,6 +225,10 @@ exports.LineTool = Montage.create(ShapeTool, { canvas.elementModel.pi = "LinePi"; canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; canvas.elementModel.shapeModel.stroke = strokeColor; + if(strokeColor) + { + canvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; + } canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; canvas.elementModel.shapeModel.strokeMaterialIndex = strokeIndex; -- cgit v1.2.3 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