aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-12 10:52:32 -0700
committerNivesh Rajbhandari2012-04-12 10:52:32 -0700
commit3bbf32b285405562471fa594c283e271d347734e (patch)
tree6420c292ad089a0a35e023cccb4c175c10653ae9 /js/helper-classes
parent2bf707156eafeb5f6166c6f28cd385ef2c4b5a50 (diff)
downloadninja-3bbf32b285405562471fa594c283e271d347734e.tar.gz
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 <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/view-utils.js15
1 files changed, 15 insertions, 0 deletions
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 {