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.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index b8411ac0..0f17dd46 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -60,7 +60,7 @@ exports.ElementController = Montage.create(Component, {
60 60
61 for(var property in properties) { 61 for(var property in properties) {
62 this.application.ninja.stylesController.setElementStyle(element, property, properties[property]); 62 this.application.ninja.stylesController.setElementStyle(element, property, properties[property]);
63 } 63 }
64 } 64 }
65 }, 65 },
66 66
@@ -231,10 +231,6 @@ exports.ElementController = Montage.create(Component, {
231 return el.elementModel.props3D.perspectiveDist; 231 return el.elementModel.props3D.perspectiveDist;
232 } else { 232 } else {
233 var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false); 233 var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false);
234 if(dist == null) {
235 dist = 1400;
236 }
237
238 el.elementModel.props3D.perspectiveDist = dist; 234 el.elementModel.props3D.perspectiveDist = dist;
239 return dist; 235 return dist;
240 } 236 }
@@ -246,7 +242,12 @@ exports.ElementController = Montage.create(Component, {
246 value: function(el, props, index, update3DModel) { 242 value: function(el, props, index, update3DModel) {
247 var dist = props[index]["dist"], 243 var dist = props[index]["dist"],
248 mat = props[index]["mat"]; 244 mat = props[index]["mat"];
249 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); 245 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")");
246
247 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform-style", "preserve-3d");
248
249 // TODO - We don't support perspective on individual elements yet
250// this.application.ninja.stylesController.setElementStyle(el, "-webkit-perspective", dist);
250 251
251 el.elementModel.props3D.matrix3d = mat; 252 el.elementModel.props3D.matrix3d = mat;
252 el.elementModel.props3D.perspectiveDist = dist; 253 el.elementModel.props3D.perspectiveDist = dist;