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.js46
1 files changed, 2 insertions, 44 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js
index 0d53696b..896d4a5b 100755
--- a/js/stage/stage-deps.js
+++ b/js/stage/stage-deps.js
@@ -26,38 +26,10 @@ 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);
60 this.eventManager.addEventListener("switchDocument", this, false);
61 33
62 // Initialize Deps 34 // Initialize Deps
63 // HACK 35 // HACK
@@ -76,19 +48,6 @@ exports.StageDeps = Montage.create(Component, {
76 48
77 handleAppLoaded: { 49 handleAppLoaded: {
78 value: function() { 50 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 51 // Setup the snap manager pointer to the app model
93 snapManager.appModel = this.application.ninja.appModel; 52 snapManager.appModel = this.application.ninja.appModel;
94 // bind the snap properties to the snap manager 53 // bind the snap properties to the snap manager
@@ -105,7 +64,7 @@ exports.StageDeps = Montage.create(Component, {
105 64
106 workingPlane = [0,0,1,0]; 65 workingPlane = [0,0,1,0];
107 66
108 snapManager.reload2DCache(); 67 snapManager._isCacheInvalid = true;
109 snapManager.setupDragPlaneFromPlane (workingPlane); 68 snapManager.setupDragPlaneFromPlane (workingPlane);
110 69
111 drawUtils.initializeFromDocument(); 70 drawUtils.initializeFromDocument();
@@ -116,9 +75,8 @@ exports.StageDeps = Montage.create(Component, {
116 value: function(){ 75 value: function(){
117 workingPlane = [0,0,1,0]; 76 workingPlane = [0,0,1,0];
118 77
78 snapManager._isCacheInvalid = true;
119 snapManager.setupDragPlaneFromPlane (workingPlane); 79 snapManager.setupDragPlaneFromPlane (workingPlane);
120 snapManager.reload2DCache();
121
122 80
123 drawUtils.initializeFromDocument(); 81 drawUtils.initializeFromDocument();
124 } 82 }