diff options
author | Valerio Virgillito | 2012-05-31 14:34:36 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-31 14:34:36 -0700 |
commit | fdc49789aaf892126f80cb17cca7f3d3b3b080bb (patch) | |
tree | fd87f765fd93aa43ff62ac1c5a68559cc753d722 /js/helper-classes/3D/snap-manager.js | |
parent | 19e3d87a8428a44c9edf3df47998c3bfe93b3c90 (diff) | |
parent | 0b830a8c6415e9cc255d1593a05ae3fa9d94c5e2 (diff) | |
download | ninja-fdc49789aaf892126f80cb17cca7f3d3b3b080bb.tar.gz |
Merge pull request #4 from mqg734/dom-architecture-pentool
Adding back the stage references in the 3d classes and fixing styles lookup for the stage.
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 8 |
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; }}, |