Skip to content

Commit

Permalink
render flyout inside window
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnickii committed Oct 1, 2024
1 parent 16e9fa1 commit dfd4172
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,15 @@ export class MgtFlyout extends MgtBaseTaskComponent {
height = anchorRectTopToWindowTop;
}
} else {
top = anchorRect.bottom;
height = anchorRectBottomToWindowBottom;
if (anchorRectTopToWindowTop >= flyoutRect.height) {
// render above anchor
bottom = windowRect.height - anchorRect.top;
height = anchorRectTopToWindowTop;
} else {
// render below anchor
top = anchorRect.bottom;
height = anchorRectBottomToWindowBottom;
}
}
} else {
if (flyoutRect.height + 2 * this._edgePadding > windowRect.height) {
Expand Down

0 comments on commit dfd4172

Please sign in to comment.