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/models | |
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/models')
-rwxr-xr-x | js/models/app-model.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/models/app-model.js b/js/models/app-model.js index 1c599a32..ceba653e 100755 --- a/js/models/app-model.js +++ b/js/models/app-model.js | |||
@@ -9,6 +9,32 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | exports.AppModel = Montage.create(Component, { | 10 | exports.AppModel = Montage.create(Component, { |
11 | 11 | ||
12 | _currentDocument: { | ||
13 | value : null | ||
14 | }, | ||
15 | |||
16 | currentDocument : { | ||
17 | get : function() { | ||
18 | return this._currentDocument; | ||
19 | }, | ||
20 | set : function(value) { | ||
21 | if (value === this._currentDocument) { | ||
22 | return; | ||
23 | } | ||
24 | |||
25 | if(this._currentDocument && this._currentDocument.currentView === "design") { | ||
26 | this._currentDocument.model.draw3DGrid = this.show3dGrid; | ||
27 | } | ||
28 | |||
29 | this._currentDocument = value; | ||
30 | |||
31 | if(this._currentDocument && this._currentDocument.currentView === "design") { | ||
32 | this.show3dGrid = this._currentDocument.model.draw3DGrid; | ||
33 | } | ||
34 | |||
35 | } | ||
36 | }, | ||
37 | |||
12 | _livePreview: { | 38 | _livePreview: { |
13 | value: false | 39 | value: false |
14 | }, | 40 | }, |