diff options
Diffstat (limited to 'js/stage/stage-deps.js')
-rwxr-xr-x | js/stage/stage-deps.js | 50 |
1 files changed, 6 insertions, 44 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index 0d53696b..d018b03b 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -26,38 +26,12 @@ exports.StageDeps = Montage.create(Component, { | |||
26 | value: drawUtils | 26 | value: drawUtils |
27 | }, | 27 | }, |
28 | 28 | ||
29 | _userContentLeft: { | ||
30 | value: null | ||
31 | }, | ||
32 | |||
33 | userContentLeft: { | ||
34 | get: function() { return this._userContentLeft; }, | ||
35 | set: function(value) { | ||
36 | if(value != null) { | ||
37 | viewUtils.setUserContentLeft(value); | ||
38 | } | ||
39 | } | ||
40 | }, | ||
41 | |||
42 | _userContentTop: { | ||
43 | value: null | ||
44 | }, | ||
45 | |||
46 | userContentTop: { | ||
47 | get: function() { return this._userContentTop; }, | ||
48 | set: function(value) { | ||
49 | if(value != null) { | ||
50 | viewUtils.setUserContentTop(value); | ||
51 | } | ||
52 | } | ||
53 | }, | ||
54 | |||
55 | deserializedFromTemplate: { | 29 | deserializedFromTemplate: { |
56 | value: function() { | 30 | value: function() { |
57 | 31 | ||
58 | this.eventManager.addEventListener("appLoaded", this, false); | 32 | this.eventManager.addEventListener("appLoaded", this, false); |
59 | this.eventManager.addEventListener("openDocument", this, false); | 33 | // this.eventManager.addEventListener("openDocument", this, false); |
60 | this.eventManager.addEventListener("switchDocument", this, false); | 34 | // this.eventManager.addEventListener("switchDocument", this, false); |
61 | 35 | ||
62 | // Initialize Deps | 36 | // Initialize Deps |
63 | // HACK | 37 | // HACK |
@@ -76,19 +50,6 @@ exports.StageDeps = Montage.create(Component, { | |||
76 | 50 | ||
77 | handleAppLoaded: { | 51 | handleAppLoaded: { |
78 | value: function() { | 52 | value: function() { |
79 | |||
80 | Object.defineBinding(this, "userContentLeft", { | ||
81 | boundObject: this.stage, | ||
82 | boundObjectPropertyPath: "_userContentLeft", | ||
83 | oneway: true | ||
84 | }); | ||
85 | |||
86 | Object.defineBinding(this, "userContentTop", { | ||
87 | boundObject: this.stage, | ||
88 | boundObjectPropertyPath: "_userContentTop", | ||
89 | oneway: true | ||
90 | }); | ||
91 | |||
92 | // Setup the snap manager pointer to the app model | 53 | // Setup the snap manager pointer to the app model |
93 | snapManager.appModel = this.application.ninja.appModel; | 54 | snapManager.appModel = this.application.ninja.appModel; |
94 | // bind the snap properties to the snap manager | 55 | // bind the snap properties to the snap manager |
@@ -105,7 +66,8 @@ exports.StageDeps = Montage.create(Component, { | |||
105 | 66 | ||
106 | workingPlane = [0,0,1,0]; | 67 | workingPlane = [0,0,1,0]; |
107 | 68 | ||
108 | snapManager.reload2DCache(); | 69 | // snapManager.reload2DCache(); |
70 | snapManager._isCacheInvalid = true; | ||
109 | snapManager.setupDragPlaneFromPlane (workingPlane); | 71 | snapManager.setupDragPlaneFromPlane (workingPlane); |
110 | 72 | ||
111 | drawUtils.initializeFromDocument(); | 73 | drawUtils.initializeFromDocument(); |
@@ -116,9 +78,9 @@ exports.StageDeps = Montage.create(Component, { | |||
116 | value: function(){ | 78 | value: function(){ |
117 | workingPlane = [0,0,1,0]; | 79 | workingPlane = [0,0,1,0]; |
118 | 80 | ||
81 | snapManager._isCacheInvalid = true; | ||
119 | snapManager.setupDragPlaneFromPlane (workingPlane); | 82 | snapManager.setupDragPlaneFromPlane (workingPlane); |
120 | snapManager.reload2DCache(); | 83 | // snapManager.reload2DCache(); |
121 | |||
122 | 84 | ||
123 | drawUtils.initializeFromDocument(); | 85 | drawUtils.initializeFromDocument(); |
124 | } | 86 | } |