aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rwxr-xr-xjs/controllers/elements/element-controller.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 0f17dd46..35a543ac 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -48,16 +48,6 @@ exports.ElementController = Montage.create(Component, {
48 48
49 setProperties: { 49 setProperties: {
50 value: function(element, properties) { 50 value: function(element, properties) {
51 /* Array of properties is not supported yet
52 if(Array.isArray(properties)) {
53
54 elements.forEach(function(property) {
55 this.application.ninja.stylesController.setElementStyle(element, p, props[p][index]);
56 });
57 } else {
58 }
59 */
60
61 for(var property in properties) { 51 for(var property in properties) {
62 this.application.ninja.stylesController.setElementStyle(element, property, properties[property]); 52 this.application.ninja.stylesController.setElementStyle(element, property, properties[property]);
63 } 53 }
@@ -239,15 +229,16 @@ exports.ElementController = Montage.create(Component, {
239 229
240 // TODO - perspective distance needs to be passed in as "dist" and matrix3d needs to be passed in as "mat" 230 // TODO - perspective distance needs to be passed in as "dist" and matrix3d needs to be passed in as "mat"
241 set3DProperties: { 231 set3DProperties: {
242 value: function(el, props, index, update3DModel) { 232 value: function(el, props, update3DModel) {
243 var dist = props[index]["dist"], 233 var dist = props["dist"],
244 mat = props[index]["mat"]; 234 mat = props["mat"];
235
245 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); 236 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")");
246 237
247 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform-style", "preserve-3d"); 238 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform-style", "preserve-3d");
248 239
249 // TODO - We don't support perspective on individual elements yet 240 // TODO - We don't support perspective on individual elements yet
250// this.application.ninja.stylesController.setElementStyle(el, "-webkit-perspective", dist); 241 // this.application.ninja.stylesController.setElementStyle(el, "-webkit-perspective", dist);
251 242
252 el.elementModel.props3D.matrix3d = mat; 243 el.elementModel.props3D.matrix3d = mat;
253 el.elementModel.props3D.perspectiveDist = dist; 244 el.elementModel.props3D.perspectiveDist = dist;