diff options
author | Valerio Virgillito | 2012-07-31 15:18:51 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-31 15:18:51 -0700 |
commit | 4343e1f92547df9f7d42eecdf7e4feb47ad960e8 (patch) | |
tree | 27913b22fc5a899ae679013427d3cfe4b497837a /js/stage/binding-view.reel/binding-view.js | |
parent | d68ad5c4aa404f66303833367700983b8d7f5303 (diff) | |
parent | b391dde5f319bf4c534e9fce523c22be3bb16ace (diff) | |
download | ninja-4343e1f92547df9f7d42eecdf7e4feb47ad960e8.tar.gz |
Merge pull request #422 from joseeight/Document
Document Code View
Diffstat (limited to 'js/stage/binding-view.reel/binding-view.js')
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js index b207cc3d..5ad2d364 100755 --- a/js/stage/binding-view.reel/binding-view.js +++ b/js/stage/binding-view.reel/binding-view.js | |||
@@ -207,22 +207,36 @@ exports.BindingView = Montage.create(Component, { | |||
207 | } | 207 | } |
208 | }, | 208 | }, |
209 | 209 | ||
210 | _currentDocument : { value: null }, | 210 | _currentDocument: { |
211 | currentDocument : { | 211 | value: null |
212 | get : function() { return this._currentDocument; }, | 212 | }, |
213 | set : function(value) { | ||
214 | if(value === this._currentDocument) { return; } | ||
215 | 213 | ||
214 | currentDocument: { | ||
215 | get: function() { | ||
216 | return this._currentDocument; | ||
217 | }, | ||
218 | set: function(value) { | ||
219 | if(value === this._currentDocument) { | ||
220 | return; | ||
221 | } | ||
216 | 222 | ||
217 | this._currentDocument = value; | 223 | this._currentDocument = value; |
224 | |||
218 | if(value) { | 225 | if(value) { |
219 | this.hide = (value.currentView === 'code'); | 226 | this.hide = (value.currentView === 'code'); |
227 | this.currentDocument.addPropertyChangeListener("model.currentView", this, false); | ||
220 | } | 228 | } |
221 | 229 | ||
222 | this.needsDraw = true; | 230 | this.needsDraw = true; |
223 | } | 231 | } |
224 | }, | 232 | }, |
225 | 233 | ||
234 | handleChange: { | ||
235 | value: function() { | ||
236 | this.hide = this.currentDocument.model.currentView.identifier === "design-code"; | ||
237 | } | ||
238 | }, | ||
239 | |||
226 | _hide : { value: true }, | 240 | _hide : { value: true }, |
227 | hide : { | 241 | hide : { |
228 | get : function() { return this._hide; }, | 242 | get : function() { return this._hide; }, |