Skip to content

Commit

Permalink
feat: set side menu to left-top on big block elements
Browse files Browse the repository at this point in the history
  • Loading branch information
m-risto committed Sep 17, 2024
1 parent 2ac7a67 commit 5c47f58
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ export class BnaSideMenuControllerComponent {
}

private async getUpdateSideMenuPositionFn(referencePos: DOMRect) {
const placement = referencePos.height < 80 ? 'left' : 'left-start';
const result = await computePosition(
getVirtualElement(referencePos),
this.elRef.nativeElement,
{
strategy: 'fixed',
placement: 'left',
placement: placement,
},
);
this.renderer2.setStyle(this.elRef.nativeElement, 'top', `${result.y}px`);
Expand Down

0 comments on commit 5c47f58

Please sign in to comment.