aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/snap-manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 4dcda24a..e3756f32 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -22,6 +22,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
22 // Instance variables 22 // Instance variables
23 /////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////
24 24
25 currentStage: { value: null },
26
25 // we keep a stack of working planes to facilitate working on other planes temporarily 27 // we keep a stack of working planes to facilitate working on other planes temporarily
26 _workingPlaneStack : { value: [], writable: true }, 28 _workingPlaneStack : { value: [], writable: true },
27 29
@@ -82,14 +84,14 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
82 popWorkingPlane : { value: function () { workingPlane = this._workingPlaneStack.pop(); return workingPlane; }}, 84 popWorkingPlane : { value: function () { workingPlane = this._workingPlaneStack.pop(); return workingPlane; }},
83 85
84 getStageWidth : { value: function () { 86 getStageWidth : { value: function () {
85 return parseInt(this.application.ninja.currentDocument.model.documentRoot.offsetWidth); 87 return parseInt(this.currentStage.offsetWidth);
86 }}, 88 }},
87 89
88 getStageHeight : { value: function () { 90 getStageHeight : { value: function () {
89 return parseInt(this.application.ninja.currentDocument.model.documentRoot.offsetHeight); 91 return parseInt(this.currentStage.offsetHeight);
90 }}, 92 }},
91 93
92 getStage : { value: function() { return this.application.ninja.currentDocument.model.documentRoot; }}, 94 getStage : { value: function() { return this.currentStage; }},
93 95
94 getGridVertexHitRad : { value: function() { return this._gridVertexHitRad; }}, 96 getGridVertexHitRad : { value: function() { return this._gridVertexHitRad; }},
95 getGridEdgeHitRad : { value: function() { return this._gridEdgeHitRad; }}, 97 getGridEdgeHitRad : { value: function() { return this._gridEdgeHitRad; }},