diff options
author | Valerio Virgillito | 2012-06-04 10:20:57 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-04 10:20:57 -0700 |
commit | c1ec69879028220b0c3f11ad6e24035bf527802c (patch) | |
tree | 043bfe4ec9e08f4f598a4845ae5fbcddacc7c8fb /js/stage/stage-deps.js | |
parent | 3abba04025dbc0daadb08184833a2558c442b8e1 (diff) | |
parent | 266460e52831c5b3a3473be420756fd88bb8aced (diff) | |
download | ninja-c1ec69879028220b0c3f11ad6e24035bf527802c.tar.gz |
Merge pull request #264 from mencio/document-bindings-fix
Document bindings fix - Changing the documents architecture to use bindings instead of events
Diffstat (limited to 'js/stage/stage-deps.js')
-rwxr-xr-x | js/stage/stage-deps.js | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index 896d4a5b..762c2529 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -14,6 +14,7 @@ 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 | |||
17 | viewUtils: { | 18 | viewUtils: { |
18 | value: viewUtils | 19 | value: viewUtils |
19 | }, | 20 | }, |
@@ -37,8 +38,6 @@ exports.StageDeps = Montage.create(Component, { | |||
37 | window.MathUtils = MathUtilsClass; | 38 | window.MathUtils = MathUtilsClass; |
38 | window.VecUtils = VecUtils; | 39 | window.VecUtils = VecUtils; |
39 | 40 | ||
40 | snapManager.drawingCanvas = this.stage.drawingCanvas; | ||
41 | |||
42 | // Setup the listeners for the draw-util and snapmanager when removing elements | 41 | // Setup the listeners for the draw-util and snapmanager when removing elements |
43 | // TODO Revisit when supporting multiple documents | 42 | // TODO Revisit when supporting multiple documents |
44 | drawUtils.initialize(); | 43 | drawUtils.initialize(); |
@@ -57,28 +56,6 @@ exports.StageDeps = Montage.create(Component, { | |||
57 | drawUtils.snapManager = snapManager; | 56 | drawUtils.snapManager = snapManager; |
58 | drawUtils.ElementPlanes = ElementPlanes; | 57 | drawUtils.ElementPlanes = ElementPlanes; |
59 | } | 58 | } |
60 | }, | ||
61 | |||
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: { | ||
75 | value: function(){ | ||
76 | workingPlane = [0,0,1,0]; | ||
77 | |||
78 | snapManager._isCacheInvalid = true; | ||
79 | snapManager.setupDragPlaneFromPlane (workingPlane); | ||
80 | |||
81 | drawUtils.initializeFromDocument(); | ||
82 | } | ||
83 | } | 59 | } |
60 | |||
84 | }); \ No newline at end of file | 61 | }); \ No newline at end of file |