aboutsummaryrefslogtreecommitdiff
path: root/js/models
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/models
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/models')
-rw-r--r--js/models/app-model.js341
-rw-r--r--js/models/color-model.js567
-rw-r--r--js/models/element-model.js42
-rw-r--r--js/models/properties-3d.js100
-rw-r--r--js/models/shape-model.js40
5 files changed, 1090 insertions, 0 deletions
diff --git a/js/models/app-model.js b/js/models/app-model.js
new file mode 100644
index 00000000..57394bb9
--- /dev/null
+++ b/js/models/app-model.js
@@ -0,0 +1,341 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10exports.AppModel = Montage.create(Component, {
11
12 _livePreview: {
13 value: false
14 },
15
16 livePreview: {
17 get: function() {
18 return this._livePreview;
19 },
20 set: function(value) {
21 this._livePreview = value;
22 }
23 },
24
25 _layoutView: {
26 value: "layoutAll"
27 },
28
29 layoutView: {
30 get: function() {
31 return this._layoutView;
32 },
33 set: function(value) {
34 this._layoutView = value;
35 }
36 },
37
38 _layoutAll: {
39 value: true
40 },
41
42 layoutAll: {
43 get: function() {
44 return this._layoutAll;
45 },
46 set: function(value) {
47
48 if(value) {
49 this.layoutView = "layoutAll";
50 this.layoutItems = false;
51 this.layoutOff = false;
52 }
53
54 this._layoutAll = value;
55
56 }
57 },
58
59 _layoutItems: {
60 value: false
61 },
62
63 layoutItems: {
64 get: function() {
65 return this._layoutItems;
66 },
67 set: function(value) {
68
69 if(value) {
70 this.layoutView = "layoutItems";
71 this.layoutAll = false;
72 this.layoutOff = false;
73 }
74
75 this._layoutItems = value;
76 }
77 },
78
79 _layoutOff: {
80 value: false
81 },
82
83 layoutOff: {
84 get: function() {
85 return this._layoutOff;
86 },
87 set: function(value) {
88
89 if(value) {
90 this.layoutView = "layoutOff";
91 this.layoutAll = false;
92 this.layoutItems = false;
93 }
94
95 this._layoutOff = value;
96 }
97 },
98
99 _snap: {
100 value: true
101 },
102
103 snap: {
104 get: function() {
105 return this._snap;
106 },
107 set: function(value) {
108 this._snap = value;
109 }
110 },
111
112 _snapGrid: {
113 value: true
114 },
115
116 snapGrid: {
117 get: function() {
118 return this._snapGrid;
119 },
120 set: function(value) {
121 this._snapGrid = value;
122 }
123 },
124
125 _snapObjects: {
126 value: true
127 },
128
129 snapObjects: {
130 get: function() {
131 return this._snapObjects;
132 },
133 set: function(value) {
134 this._snapObjects = value;
135 }
136 },
137
138 _snapAlign: {
139 value: true
140 },
141
142 snapAlign: {
143 get: function() {
144 return this._snapAlign;
145 },
146 set: function(value) {
147 this._snapAlign = value;
148 }
149 },
150
151 _show3dGrid: {
152 value: false
153 },
154
155 show3dGrid: {
156 get: function() {
157 return this._show3dGrid;
158 },
159 set: function(value) {
160 this._show3dGrid = value;
161 }
162 },
163
164 _documentStageView: {
165 value: "front"
166 },
167
168 documentStageView: {
169 get: function() {
170 return this._documentStageView;
171 },
172 set: function(value) {
173 this._documentStageView = value;
174 }
175 },
176
177 _frontStageView: {
178 value: true
179 },
180
181 frontStageView: {
182 get: function() {
183 return this._frontStageView;
184 },
185 set: function(value) {
186 if(value) {
187 this.documentStageView = "front";
188 this.topStageView = false;
189 this.sideStageView = false;
190 }
191
192 this._frontStageView = value;
193 }
194 },
195
196 _topStageView: {
197 value: false
198 },
199
200 topStageView: {
201 get: function() {
202 return this._topStageView;
203 },
204 set: function(value) {
205 if(value) {
206 this.documentStageView = "top";
207 this.frontStageView = false;
208 this.sideStageView = false;
209 }
210
211 this._topStageView = value;
212 }
213 },
214
215 _sideStageView: {
216 value: false
217 },
218
219 sideStageView: {
220 get: function() {
221 return this._sideStageView;
222 },
223 set: function(value) {
224 if(value) {
225 this.documentStageView = "side";
226 this.frontStageView = false;
227 this.topStageView = false;
228 }
229
230 this._sideStageView = value;
231 }
232 },
233
234 _debug: {
235 value: true
236 },
237
238 debug: {
239 get: function() {
240 return this._debug;
241 },
242 set: function(value) {
243 this._debug = value;
244 }
245 },
246
247 /**
248 * Panels Model Properties
249 */
250 _propertiesPanel: {
251 value: true
252 },