diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/elements/element-controller.js | 4 | ||||
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 15 |
2 files changed, 19 insertions, 0 deletions
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, { | |||
264 | "-webkit-transform", | 264 | "-webkit-transform", |
265 | "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); | 265 | "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); |
266 | 266 | ||
267 | this.application.ninja.stylesController.setElementStyle(el, | ||
268 | "-webkit-transform-style", | ||
269 | "preserve-3d"); | ||
270 | |||
267 | // TODO - We don't support perspective on individual elements yet | 271 | // TODO - We don't support perspective on individual elements yet |
268 | // this.application.ninja.stylesController.setElementStyle(el, | 272 | // this.application.ninja.stylesController.setElementStyle(el, |
269 | // "-webkit-perspective", | 273 | // "-webkit-perspective", |
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 4a6c2503..addabba5 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -658,6 +658,21 @@ exports.ViewUtils = Montage.create(Component, { | |||
658 | // if (elt.__ninjaXOff) xOff = elt.__ninjaXOff; | 658 | // if (elt.__ninjaXOff) xOff = elt.__ninjaXOff; |
659 | // if (elt.__ninjaYOff) yOff = elt.__ninjaYOff; | 659 | // if (elt.__ninjaYOff) yOff = elt.__ninjaYOff; |
660 | var offset = [xOff, yOff]; | 660 | var offset = [xOff, yOff]; |
661 | if(elt.offsetParent && (elt.offsetParent !== this._stageElement)) | ||
662 | { | ||
663 | var pS = elt.ownerDocument.defaultView.getComputedStyle(elt.offsetParent); | ||
664 | |||
665 | var border = parseInt(pS.getPropertyValue("border")); | ||
666 | |||
667 | if(border) | ||
668 | { | ||
669 | var bl = parseInt(pS.getPropertyValue("border-left-width")), | ||
670 | bt = parseInt(pS.getPropertyValue("border-top-width")); | ||
671 | |||
672 | offset[0] += bl; | ||
673 | offset[1] += bt; | ||
674 | } | ||
675 | } | ||
661 | 676 | ||
662 | if(elt === this._stageElement) | 677 | if(elt === this._stageElement) |
663 | { | 678 | { |