Skip to content

Commit

Permalink
fix(telecom): placement of popover
Browse files Browse the repository at this point in the history
ref: INC0084442

Signed-off-by: Antony MARION <[email protected]>
  • Loading branch information
Antony MARION committed Nov 15, 2024
1 parent f014c02 commit ead81b0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default /* @ngInject */ ($compile, $locale, coreConfig) => ({
const { x, y } = element[0].getBoundingClientRect();
const nearFromBottomBorder = y >= (3 * window.screen.height) / 4;
const nearFromRightBorder = x >= (3 * window.screen.width) / 4;
const nearFromTopBorder = y <= window.screen.height / 4;

if (nearFromRightBorder) {
return 'auto right';
Expand All @@ -125,7 +126,11 @@ export default /* @ngInject */ ($compile, $locale, coreConfig) => ({
return 'top left';
}

return 'auto left';
if (nearFromTopBorder) {
return 'bottom auto';
}

return 'top auto';
},
'data-popover-is-open': 'event.inEdition',
'data-popover-class': 'pretty-popover telephony-scheduler-events-popup',
Expand Down

0 comments on commit ead81b0

Please sign in to comment.