[Fronted] Fixes for misaligned bubbles

WTD-1247
WTD-884
Changed CSS .l-infobubble-wrapper abs > relative;
Added display: block class for mct-container;
Tweaked bubble evaluation JS for 'goLeft' behavior;
Added constants for bubble max width and left/right margin;
This commit is contained in:
Charles Hacskaylo
2015-06-12 16:24:25 -07:00
parent 0b46050e04
commit c6c4fa7182
6 changed files with 31 additions and 15 deletions

View File

@@ -28,5 +28,8 @@ define({
"</mct-include>" +
"</mct-container>",
// Pixel offset for bubble, to align arrow position
BUBBLE_OFFSET: [ 0, -16 ]
BUBBLE_OFFSET: [ 0, -16 ],
// Max width and margins allowed for bubbles; defined in /platform/commonUI/general/res/sass/_constants.scss
BUBBLE_MARGIN_LR: 10,
BUBBLE_MAX_WIDTH: 300
});

View File

@@ -39,7 +39,8 @@ define(
var body = $document.find('body'),
scope = $rootScope.$new(),
winDim = [$window.innerWidth, $window.innerHeight],
goLeft = position[0] > (winDim[0] / 2),
bubbleSpaceLR = InfoConstants.BUBBLE_MARGIN_LR + InfoConstants.BUBBLE_MAX_WIDTH,
goLeft = position[0] > (winDim[0] - bubbleSpaceLR),
goUp = position[1] > (winDim[1] / 2),
bubble;