diff options
author | Valerio Virgillito | 2012-04-27 14:21:35 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-27 14:21:35 -0700 |
commit | b08cc404d32dd1d4dbc2139ce8f06d7d88b681a8 (patch) | |
tree | ae45391131c7c5203ae8e0d3470d106d835c8c6b /js/controllers/elements/body-controller.js | |
parent | 314709dd189807bfc762aa150bb1b29d2ccdf25b (diff) | |
parent | 6c1aa27b7753bc9007514859b42160fae265740d (diff) | |
download | ninja-b08cc404d32dd1d4dbc2139ce8f06d7d88b681a8.tar.gz |
Merge branch 'refs/heads/serialization'
Diffstat (limited to 'js/controllers/elements/body-controller.js')
-rwxr-xr-x | js/controllers/elements/body-controller.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js new file mode 100755 index 00000000..fbbb7c6e --- /dev/null +++ b/js/controllers/elements/body-controller.js | |||
@@ -0,0 +1,44 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | var Montage = require("montage/core/core").Montage, | ||
8 | ElementController = require("js/controllers/elements/element-controller").ElementController; | ||
9 | |||
10 | exports.BodyController = Montage.create(ElementController, { | ||
11 | |||
12 | // TODO - perspective distance needs to be passed in as "dist" and matrix3d needs to be passed in as "mat" | ||
13 | set3DProperties: { | ||
14 | value: function(el, props, update3DModel) { | ||
15 | } | ||
16 | }, | ||
17 | |||
18 | getProperty: { | ||
19 | value: function(el, p) { | ||
20 | } | ||
21 | }, | ||
22 | |||
23 | setProperty: { | ||
24 | value: function(el, p, value) { | ||
25 | } | ||
26 | }, | ||
27 | |||
28 | setAttribute: { | ||
29 | value: function(el, att, value) { | ||
30 | } | ||
31 | }, | ||
32 | |||
33 | getPerspectiveDist: { | ||
34 | value: function(el) { | ||
35 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { | ||
36 | return el.elementModel.props3D.perspectiveDist; | ||
37 | } else { | ||
38 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); | ||
39 | el.elementModel.props3D.perspectiveDist = dist; | ||
40 | return dist; | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | }); | ||