mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[Time Conductor] Show appropriate arrow
...on info bubbles, when using bubbles shown via the popupService.
This commit is contained in:
@ -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
|
||||
|
@ -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();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user