From 3bbf32b285405562471fa594c283e271d347734e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 12 Apr 2012 10:52:32 -0700 Subject: Borders are not factored into offset calculations by the browser, so we have to adjust for them. Also, we should set webkit-transform-style to preserve-3d if elements are rotated (until we also support flattened mode). Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/element-controller.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/controllers/elements/element-controller.js') diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 7ab6664f..2ac84452 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js @@ -264,6 +264,10 @@ exports.ElementController = Montage.create(Component, { "-webkit-transform", "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); + this.application.ninja.stylesController.setElementStyle(el, + "-webkit-transform-style", + "preserve-3d"); + // TODO - We don't support perspective on individual elements yet // this.application.ninja.stylesController.setElementStyle(el, // "-webkit-perspective", -- cgit v1.2.3