[Time Conductor] Show appropriate arrow

...on info bubbles, when using bubbles shown via the
popupService.
This commit is contained in:
Victor Woeltjen
2015-10-01 16:59:12 -07:00
parent 6cbd3e5fae
commit dfe909d6b5
4 changed files with 111 additions and 27 deletions

View File

@ -32,17 +32,14 @@ define({
"bubble-title=\"{{bubbleTitle}}\" " +
"bubble-layout=\"{{bubbleLayout}}\" " +
"class=\"bubble-container\">" +
"<mct-include key=\"bubbleTemplate\" ng-model=\"bubbleModel\">" +
"<mct-include key=\"bubbleTemplate\" " +
"ng-model=\"bubbleModel\">" +
"</mct-include>" +
"</mct-container>",
// Options and classes for bubble
BUBBLE_OPTIONS: {
offsetX: 0,
offsetY: -26,
leftClass: 'arw-left',
rightClass: 'arw-right',
topClass: 'arw-top',
bottomClss: 'arw-btm'
offsetY: -26
},
BUBBLE_MOBILE_POSITION: [ 0, -25 ],
// Max width and margins allowed for bubbles; defined in /platform/commonUI/general/res/sass/_constants.scss

View File

@ -60,7 +60,7 @@ define(
bubbleSpaceLR = InfoConstants.BUBBLE_MARGIN_LR +
InfoConstants.BUBBLE_MAX_WIDTH,
options,
dismissPopup,
popup,
bubble;
// Pass model & container parameters into the scope
@ -81,12 +81,18 @@ define(
options = {};
}
dismissPopup =
this.popupService.display(bubble, position, options);
popup = this.popupService.display(bubble, position, options);
// Style the bubble according to how it was positioned
if (popup.goesLeft()) {
scope.bubbleLayout = 'arw-right';
} else if (popup.goesRight()) {
scope.bubbleLayout = 'arw-left';
}
// Return a function to dismiss the info bubble
return function dismiss() {
dismissPopup();
popup.dismiss();
scope.$destroy();
};
};