diff options
Diffstat (limited to 'js/document/models/base.js')
-rwxr-xr-x | js/document/models/base.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js index c7e2de69..a9bbd6db 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -91,6 +91,8 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
91 | _selection: { | 91 | _selection: { |
92 | value: [] | 92 | value: [] |
93 | }, | 93 | }, |
94 | //////////////////////////////////////////////////////////////////// | ||
95 | // | ||
94 | domContainer: { | 96 | domContainer: { |
95 | value: null | 97 | value: null |
96 | }, | 98 | }, |
@@ -120,7 +122,8 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
120 | libs: { | 122 | libs: { |
121 | value: null | 123 | value: null |
122 | }, | 124 | }, |
123 | 125 | //////////////////////////////////////////////////////////////////// | |
126 | // | ||
124 | _mObjects: { | 127 | _mObjects: { |
125 | value: [] | 128 | value: [] |
126 | }, | 129 | }, |
@@ -138,6 +141,23 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
138 | switchViewTo: { | 141 | switchViewTo: { |
139 | value: function (view) { | 142 | value: function (view) { |
140 | // | 143 | // |
144 | switch (view) { | ||
145 | case 'design': | ||
146 | // | ||
147 | if (this.views.design) this.views.design.show(); | ||
148 | if (this.views.code) this.views.code.hide(); | ||
149 | this.currentView = this.views.design; | ||
150 | break; | ||
151 | case 'code': | ||
152 | // | ||
153 | if (this.views.code) this.views.code.show(); | ||
154 | if (this.views.design) this.views.design.hide(); | ||
155 | this.currentView = this.views.code; | ||
156 | break; | ||
157 | default: | ||
158 | //Error | ||
159 | break; | ||
160 | } | ||
141 | } | 161 | } |
142 | }, | 162 | }, |
143 | //////////////////////////////////////////////////////////////////// | 163 | //////////////////////////////////////////////////////////////////// |