diff options
author | Jose Antonio Marquez | 2012-05-16 11:37:25 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-16 11:37:25 -0700 |
commit | 78250b70bdf0089e2b8ac56fb77e2f76ab83f34c (patch) | |
tree | 90f47e970993b659c25ca1ab190f554655b57d32 /js/stage | |
parent | 5de553a1b3bdd8783ab6ce017ae70369ad92a890 (diff) | |
parent | 80f2b57b2126bbe90ce6ab3663ac04ffcc40a393 (diff) | |
download | ninja-78250b70bdf0089e2b8ac56fb77e2f76ab83f34c.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage-deps.js | 6 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.html | 3 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 23 |
3 files changed, 26 insertions, 6 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index 33ba2359..1825eb06 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -95,12 +95,6 @@ exports.StageDeps = Montage.create(Component, { | |||
95 | handleAppLoaded: { | 95 | handleAppLoaded: { |
96 | value: function() { | 96 | value: function() { |
97 | 97 | ||
98 | Object.defineBinding(this, "currentDocument", { | ||
99 | boundObject: this.application.ninja, | ||
100 | boundObjectPropertyPath: "currentDocument", | ||
101 | oneway: true | ||
102 | }); | ||
103 | |||
104 | Object.defineBinding(this, "userContentLeft", { | 98 | Object.defineBinding(this, "userContentLeft", { |
105 | boundObject: this.stage, | 99 | boundObject: this.stage, |
106 | boundObjectPropertyPath: "_userContentLeft", | 100 | boundObjectPropertyPath: "_userContentLeft", |
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 30c3d231..88cd6149 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html | |||
@@ -22,6 +22,9 @@ | |||
22 | "prototype": "js/stage/stage-deps", | 22 | "prototype": "js/stage/stage-deps", |
23 | "properties": { | 23 | "properties": { |
24 | "stage": {"@": "owner"} | 24 | "stage": {"@": "owner"} |
25 | }, | ||
26 | "bindings": { | ||
27 | "currentDocument": {"<-": "@owner.activeDocument"} | ||
25 | } | 28 | } |
26 | }, | 29 | }, |
27 | 30 | ||
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index deed4112..125155d8 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -164,6 +164,29 @@ exports.Stage = Montage.create(Component, { | |||
164 | set: function(value) { this._userContentBorder = value; } | 164 | set: function(value) { this._userContentBorder = value; } |
165 | }, | 165 | }, |
166 | 166 | ||
167 | _activeDocument : { | ||
168 | value : null, | ||
169 | enumerable : false | ||
170 | }, | ||
171 | |||
172 | activeDocument : { | ||
173 | get : function() { | ||
174 | return this._activeDocument; | ||
175 | }, | ||
176 | set : function(document) { | ||
177 | ///// If the document is null set default stylesheets to null | ||
178 | |||
179 | if(!document) { | ||
180 | return false; | ||
181 | } | ||
182 | |||
183 | ///// setting document via binding | ||
184 | this._activeDocument = document; | ||
185 | |||
186 | }, | ||
187 | enumerable : false | ||
188 | }, | ||
189 | |||
167 | willDraw: { | 190 | willDraw: { |
168 | value: function() { | 191 | value: function() { |
169 | if(this.resizeCanvases) { | 192 | if(this.resizeCanvases) { |