diff options
Diffstat (limited to 'js/stage/stage-deps.js')
-rwxr-xr-x | js/stage/stage-deps.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index f27254f9..709c0201 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -25,7 +25,7 @@ exports.StageDeps = Montage.create(Component, { | |||
25 | return this._currentDocument; | 25 | return this._currentDocument; |
26 | }, | 26 | }, |
27 | set : function(value) { | 27 | set : function(value) { |
28 | if (value === this._currentDocument) {// || value.getProperty("currentView") !== "design") { | 28 | if (value === this._currentDocument) { |
29 | return; | 29 | return; |
30 | } | 30 | } |
31 | 31 | ||
@@ -68,8 +68,6 @@ exports.StageDeps = Montage.create(Component, { | |||
68 | window.MathUtils = MathUtilsClass; | 68 | window.MathUtils = MathUtilsClass; |
69 | window.VecUtils = VecUtils; | 69 | window.VecUtils = VecUtils; |
70 | 70 | ||
71 | snapManager.drawingCanvas = this.stage.drawingCanvas; | ||
72 | |||
73 | // Setup the listeners for the draw-util and snapmanager when removing elements | 71 | // Setup the listeners for the draw-util and snapmanager when removing elements |
74 | // TODO Revisit when supporting multiple documents | 72 | // TODO Revisit when supporting multiple documents |
75 | drawUtils.initialize(); | 73 | drawUtils.initialize(); |
@@ -88,16 +86,6 @@ exports.StageDeps = Montage.create(Component, { | |||
88 | drawUtils.snapManager = snapManager; | 86 | drawUtils.snapManager = snapManager; |
89 | drawUtils.ElementPlanes = ElementPlanes; | 87 | drawUtils.ElementPlanes = ElementPlanes; |
90 | } | 88 | } |
91 | }, | ||
92 | |||
93 | handleSwitchDocument: { | ||
94 | value: function(){ | ||
95 | workingPlane = [0,0,1,0]; | ||
96 | |||
97 | snapManager._isCacheInvalid = true; | ||
98 | snapManager.setupDragPlaneFromPlane (workingPlane); | ||
99 | |||
100 | drawUtils.initializeFromDocument(); | ||
101 | } | ||
102 | } | 89 | } |
90 | |||
103 | }); \ No newline at end of file | 91 | }); \ No newline at end of file |