diff options
author | Jose Antonio Marquez | 2012-05-18 09:52:15 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-18 09:52:15 -0700 |
commit | 6c70c8bf28c2239d29f3abecc8a7ea59b2860bab (patch) | |
tree | c506b28bc82f74072f324d920105737726d5ecaf /js/helper-classes/3D/snap-manager.js | |
parent | 015df99dff8306f8839affd22cdd7689eb00e180 (diff) | |
parent | 24d1873302b2fffc25d254e15e8aa36f59eedb88 (diff) | |
download | ninja-6c70c8bf28c2239d29f3abecc8a7ea59b2860bab.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 2e8020d3..e22ac3ad 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -21,7 +21,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
21 | /////////////////////////////////////////////////////////////////////// | 21 | /////////////////////////////////////////////////////////////////////// |
22 | // Instance variables | 22 | // Instance variables |
23 | /////////////////////////////////////////////////////////////////////// | 23 | /////////////////////////////////////////////////////////////////////// |
24 | currentStage: { value: null, writable: true }, | ||
25 | drawingCanvas: { value: null, writable: true}, | 24 | drawingCanvas: { value: null, writable: true}, |
26 | 25 | ||
27 | // we keep a stack of working planes to facilitate working on other planes temporarily | 26 | // we keep a stack of working planes to facilitate working on other planes temporarily |
@@ -84,14 +83,14 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
84 | popWorkingPlane : { value: function () { workingPlane = this._workingPlaneStack.pop(); return workingPlane; }}, | 83 | popWorkingPlane : { value: function () { workingPlane = this._workingPlaneStack.pop(); return workingPlane; }}, |
85 | 84 | ||
86 | getStageWidth : { value: function () { | 85 | getStageWidth : { value: function () { |
87 | return parseInt(this.currentStage.offsetWidth); | 86 | return parseInt(this.application.ninja.currentDocument.documentRoot.offsetWidth); |
88 | }}, | 87 | }}, |
89 | 88 | ||
90 | getStageHeight : { value: function () { | 89 | getStageHeight : { value: function () { |
91 | return parseInt(this.currentStage.offsetHeight); | 90 | return parseInt(this.application.ninja.currentDocument.documentRoot.offsetHeight); |
92 | }}, | 91 | }}, |
93 | 92 | ||
94 | getStage : { value: function() { return this.currentStage; }}, | 93 | getStage : { value: function() { return this.application.ninja.currentDocument.documentRoot; }}, |
95 | 94 | ||
96 | getGridVertexHitRad : { value: function() { return this._gridVertexHitRad; }}, | 95 | getGridVertexHitRad : { value: function() { return this._gridVertexHitRad; }}, |
97 | getGridEdgeHitRad : { value: function() { return this._gridEdgeHitRad; }}, | 96 | getGridEdgeHitRad : { value: function() { return this._gridEdgeHitRad; }}, |
@@ -185,12 +184,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
185 | } | 184 | } |
186 | }, | 185 | }, |
187 | 186 | ||
188 | setCurrentStage: { | ||
189 | value: function(stage) { | ||
190 | this.currentStage = stage; | ||
191 | } | ||
192 | }, | ||
193 | |||
194 | snap : { | 187 | snap : { |
195 | value: function (xScreen, yScreen, snap3D, quadPt) | 188 | value: function (xScreen, yScreen, snap3D, quadPt) |
196 | { | 189 | { |
@@ -463,6 +456,13 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
463 | } | 456 | } |
464 | }, | 457 | }, |
465 | 458 | ||
459 | reload2DCache: { | ||
460 | value: function() { | ||
461 | this.clear2DCache(); | ||
462 | this.load2DCache(workingPlane); | ||
463 | } | ||
464 | }, | ||
465 | |||
466 | clear2DCache : { | 466 | clear2DCache : { |
467 | value : function() { | 467 | value : function() { |
468 | // clear the 2D cache flags in the objects | 468 | // clear the 2D cache flags in the objects |