diff options
author | Jose Antonio Marquez | 2012-04-27 14:29:01 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-27 14:29:01 -0700 |
commit | 7fdeb9feac4d2da9f86646cda4548ea60e5effa9 (patch) | |
tree | 6b43b7b2375fad6804ae88287906e3b77b4539b9 /js/controllers/elements | |
parent | d988dead643ff4f9bfa417286a6b5f88be0e7c82 (diff) | |
parent | c8fac64d4ad8ac18744a17a5e0f0d17204355fd6 (diff) | |
download | ninja-7fdeb9feac4d2da9f86646cda4548ea60e5effa9.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/body-controller.js | 44 | ||||
-rwxr-xr-x | js/controllers/elements/controller-factory.js | 5 |
2 files changed, 48 insertions, 1 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 | }); | ||
diff --git a/js/controllers/elements/controller-factory.js b/js/controllers/elements/controller-factory.js index a772eb16..1bbbbce0 100755 --- a/js/controllers/elements/controller-factory.js +++ b/js/controllers/elements/controller-factory.js | |||
@@ -6,7 +6,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | 8 | ||
9 | var BlockController = require("js/controllers/elements/block-controller").BlockController, | 9 | var BodyController = require("js/controllers/elements/body-controller").BodyController, |
10 | BlockController = require("js/controllers/elements/block-controller").BlockController, | ||
10 | StageController = require("js/controllers/elements/stage-controller").StageController, | 11 | StageController = require("js/controllers/elements/stage-controller").StageController, |
11 | ShapesController = require("js/controllers/elements/shapes-controller").ShapesController, | 12 | ShapesController = require("js/controllers/elements/shapes-controller").ShapesController, |
12 | ImageController = require("js/controllers/elements/image-controller").ImageController, | 13 | ImageController = require("js/controllers/elements/image-controller").ImageController, |
@@ -27,6 +28,8 @@ exports.ControllerFactory = Montage.create(Montage, { | |||
27 | return BlockController; | 28 | return BlockController; |
28 | } else if(value.indexOf("stage") !== -1) { | 29 | } else if(value.indexOf("stage") !== -1) { |
29 | return StageController; | 30 | return StageController; |
31 | } else if(value.indexOf("body") !== -1) { | ||
32 | return BodyController; | ||
30 | } else if(value.indexOf("shape") !== -1) { | 33 | } else if(value.indexOf("shape") !== -1) { |
31 | return ShapesController; | 34 | return ShapesController; |
32 | } else if(value.indexOf("canvas") !== -1) { | 35 | } else if(value.indexOf("canvas") !== -1) { |