diff options
Diffstat (limited to 'js/stage/stage-deps.js')
-rwxr-xr-x | js/stage/stage-deps.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index b45315b7..709c0201 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -14,6 +14,37 @@ 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 | ||
16 | exports.StageDeps = Montage.create(Component, { | 16 | exports.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) { | ||
29 | return; | ||
30 | } | ||
31 | |||
32 | this._currentDocument = value; | ||
33 | |||
34 | if(!value) { | ||
35 | |||
36 | } else if(this._currentDocument.currentView === "design") { | ||
37 | workingPlane = [0,0,1,0]; | ||
38 | |||
39 | snapManager._isCacheInvalid = true; | ||
40 | snapManager.setupDragPlaneFromPlane (workingPlane); | ||
41 | |||
42 | drawUtils.initializeFromDocument(); | ||
43 | } | ||
44 | |||
45 | } | ||
46 | }, | ||
47 | |||
17 | viewUtils: { | 48 | viewUtils: { |
18 | value: viewUtils | 49 | value: viewUtils |
19 | }, | 50 | }, |