Skip to content

Commit 0ba88e9

Browse files
committed
fix(sheet overlay): fix height computation for sheet
1 parent bcd97c2 commit 0ba88e9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

projects/components/src/overlay/sheet/sheet-overlay.component.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { ChangeDetectionStrategy, Component, HostListener, Inject, Injector, TemplateRef, Type } from '@angular/core';
22
import { IconType } from '@hypertrace/assets-library';
3-
import { ExternalNavigationParams, GLOBAL_HEADER_HEIGHT, LayoutChangeService } from '@hypertrace/common';
3+
import { ExternalNavigationParams, LayoutChangeService } from '@hypertrace/common';
44
import { ButtonStyle } from '../../button/button';
55
import { IconSize } from '../../icon/icon-size';
6-
import { PopoverFixedPositionLocation, POPOVER_DATA } from '../../popover/popover';
6+
import { POPOVER_DATA } from '../../popover/popover';
77
import { PopoverRef } from '../../popover/popover-ref';
88
import { SheetConstructionData } from '../overlay.service';
99
import { SheetOverlayConfig, SheetSize } from './sheet';
@@ -72,7 +72,6 @@ export class SheetOverlayComponent {
7272
public constructor(
7373
private readonly popoverRef: PopoverRef,
7474
@Inject(POPOVER_DATA) sheetData: SheetConstructionData,
75-
@Inject(GLOBAL_HEADER_HEIGHT) globalHeaderHeight: string,
7675
layoutChange: LayoutChangeService
7776
) {
7877
const sheetConfig: SheetOverlayConfig = sheetData.config;
@@ -85,7 +84,7 @@ export class SheetOverlayComponent {
8584

8685
this.isComponentSheet = !(sheetConfig.content instanceof TemplateRef);
8786
this.renderer = sheetConfig.content;
88-
this.popoverRef.height(this.getHeightForPopover(globalHeaderHeight, sheetConfig.position));
87+
this.popoverRef.height('100vh');
8988
this.setWidth();
9089
this.navigationParams = sheetConfig.pageNavParams;
9190
this.rendererInjector = Injector.create({
@@ -137,8 +136,4 @@ export class SheetOverlayComponent {
137136
return '100%';
138137
}
139138
}
140-
141-
private getHeightForPopover(globalHeaderHeight: string, position?: PopoverFixedPositionLocation): string {
142-
return position === PopoverFixedPositionLocation.Right ? '100vh' : `calc(100vh - ${globalHeaderHeight})`;
143-
}
144139
}

0 commit comments

Comments
 (0)