[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:
@@ -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
|
||||
});
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user