]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fixed the the top and bottom pane's alignment in RTL mode #7560
authorAbdullah Salem <abdullahsalem@outlook.com>
Tue, 19 Jan 2016 20:05:32 +0000 (23:05 +0300)
committerKevin Ball <kmball11@gmail.com>
Wed, 24 Feb 2016 17:19:48 +0000 (09:19 -0800)
js/foundation.util.box.js

index 3d0ce87d7770d177df105a46331c4ab1661d27a4..cb2756433270ee3e17e428b5f7d472eaf0dc58ac 100644 (file)
@@ -115,7 +115,7 @@ function GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) {
   switch (position) {
     case 'top':
       return {
-        left: $anchorDims.offset.left,
+        left: (Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left), left: $anchorDims.offset.left,
         top: $anchorDims.offset.top - ($eleDims.height + vOffset)
       }
       break;
@@ -174,7 +174,7 @@ function GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) {
       break;
     default:
       return {
-        left: $anchorDims.offset.left,
+        left: (Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left),
         top: $anchorDims.offset.top + $anchorDims.height + vOffset
       }
   }