diff options
-rwxr-xr-x | js/panels/properties.reel/properties.html | 5 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 4 | ||||
-rwxr-xr-x | js/tools/PenTool.js | 2 |
3 files changed, 9 insertions, 2 deletions
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 @@ | |||
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | "threeDProperties": { | 58 | "threeDProperties": { |
59 | "prototype": "js/panels/properties.reel/sections/three-d-view.reel[ThreeD]" | 59 | "prototype": "js/panels/properties.reel/sections/three-d-view.reel[ThreeD]", |
60 | "bindings": { | ||
61 | "currentDocument": {"<-": "@owner.currentDocument"} | ||
62 | } | ||
60 | }, | 63 | }, |
61 | 64 | ||
62 | "CustomSections": { | 65 | "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, { | |||
198 | } | 198 | } |
199 | }, | 199 | }, |
200 | 200 | ||
201 | _currentDocument: { | ||
202 | value : null | ||
203 | }, | ||
204 | |||
201 | currentDocument : { | 205 | currentDocument : { |
202 | get : function() { | 206 | get : function() { |
203 | return this._currentDocument; | 207 | return this._currentDocument; |
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, { | |||
428 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; | 428 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; |
429 | var drawingCanvas = this._selectedSubpath.getCanvas(); | 429 | var drawingCanvas = this._selectedSubpath.getCanvas(); |
430 | if (!drawingCanvas){ | 430 | if (!drawingCanvas){ |
431 | drawingCanvas = ViewUtils.getStageElement(); | 431 | drawingCanvas = this.application.ninja.currentDocument.model.documentRoot; |
432 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); | 432 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); |
433 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; | 433 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; |
434 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; | 434 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; |