aboutsummaryrefslogtreecommitdiff
path: root/js/stage/stage-deps.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage/stage-deps.js')
-rwxr-xr-xjs/stage/stage-deps.js40
1 files changed, 28 insertions, 12 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js
index 896d4a5b..756844fd 100755
--- a/js/stage/stage-deps.js
+++ b/js/stage/stage-deps.js
@@ -14,6 +14,34 @@ var Montage = require("montage/core/core").Montage,
14 VecUtils = require("js/helper-classes/3D/vec-utils").VecUtils; 14 VecUtils = require("js/helper-classes/3D/vec-utils").VecUtils;
15 15
16exports.StageDeps = Montage.create(Component, { 16exports.StageDeps = Montage.create(Component, {
17
18 _currentDocument: {
19 value : null,
20 enumerable : false
21 },
22
23 currentDocument : {
24 get : function() {
25 return this._currentDocument;
26 },
27 set : function(value) {
28 if (value === this._currentDocument || value.getProperty("currentView") !== "design") {
29 return;
30 }
31
32 this._currentDocument = value;
33
34 if(this._currentDocument) {
35 workingPlane = [0,0,1,0];
36
37 snapManager._isCacheInvalid = true;
38 snapManager.setupDragPlaneFromPlane (workingPlane);
39
40 drawUtils.initializeFromDocument();
41 }
42 }
43 },
44
17 viewUtils: { 45 viewUtils: {
18 value: viewUtils 46 value: viewUtils
19 }, 47 },
@@ -59,18 +87,6 @@ exports.StageDeps = Montage.create(Component, {
59 } 87 }
60 }, 88 },
61 89
62 handleOpenDocument: {
63 value: function() {
64
65 workingPlane = [0,0,1,0];
66
67 snapManager._isCacheInvalid = true;
68 snapManager.setupDragPlaneFromPlane (workingPlane);
69
70 drawUtils.initializeFromDocument();
71 }
72 },
73
74 handleSwitchDocument: { 90 handleSwitchDocument: {
75 value: function(){ 91 value: function(){
76 workingPlane = [0,0,1,0]; 92 workingPlane = [0,0,1,0];