From dd8a94c4ef0ccf19c332dd0a0c56fb8249aea63b Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 30 May 2012 13:13:01 -0700 Subject: Fixed bad reference to stage element in pen tool. Signed-off-by: Nivesh Rajbhandari --- js/tools/PenTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 10eb03c9..3813123a 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js @@ -428,7 +428,7 @@ exports.PenTool = Montage.create(ShapeTool, { var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; var drawingCanvas = this._selectedSubpath.getCanvas(); if (!drawingCanvas){ - drawingCanvas = ViewUtils.getStageElement(); + drawingCanvas = this.application.ninja.currentDocument.model.documentRoot; stageWorldMousePos = hitRec.calculateStageWorldPoint(); stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; -- cgit v1.2.3 From 752f76fa464e2c9e48b4a0e5429a5b8062c00b39 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 30 May 2012 13:38:39 -0700 Subject: PI's 3d section was not binding correctly to the current document. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties.reel/properties.html | 5 ++++- js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index ac0dab5a..b9aa206b 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html @@ -56,7 +56,10 @@ } }, "threeDProperties": { - "prototype": "js/panels/properties.reel/sections/three-d-view.reel[ThreeD]" + "prototype": "js/panels/properties.reel/sections/three-d-view.reel[ThreeD]", + "bindings": { + "currentDocument": {"<-": "@owner.currentDocument"} + } }, "CustomSections": { diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 0320c327..49907c9d 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -198,6 +198,10 @@ exports.ThreeD = Montage.create(Component, { } }, + _currentDocument: { + value : null + }, + currentDocument : { get : function() { return this._currentDocument; -- cgit v1.2.3