]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Allow vOffset option in floated dropdown alignment 9257/head
authorDavid Reese <david@whatcould.com>
Fri, 14 Oct 2016 13:50:15 +0000 (09:50 -0400)
committerDavid Reese <david@whatcould.com>
Fri, 14 Oct 2016 13:50:15 +0000 (09:50 -0400)
Left-bottom and right-bottom were added recently but the vOffset option was left out; since the default positioning (which would correspond to `bottom`) adds vOffset, seems like right-bottom and left-bottom should too.

js/foundation.util.box.js

index 0aca82c841ff740f3f447f41bf53396b5cce17c2..f734a0cfb0435df0893fa0326a8e1bbdf70bd5c2 100644 (file)
@@ -175,13 +175,13 @@ function GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) {
     case 'left bottom':
       return {
         left: $anchorDims.offset.left,
-        top: $anchorDims.offset.top + $anchorDims.height
+        top: $anchorDims.offset.top + $anchorDims.height + vOffset
       };
       break;
     case 'right bottom':
       return {
         left: $anchorDims.offset.left + $anchorDims.width + hOffset - $eleDims.width,
-        top: $anchorDims.offset.top + $anchorDims.height
+        top: $anchorDims.offset.top + $anchorDims.height + vOffset
       };
       break;
     default: