1
1
import { ChangeDetectionStrategy , Component , HostListener , Inject , Injector , TemplateRef , Type } from '@angular/core' ;
2
2
import { IconType } from '@hypertrace/assets-library' ;
3
- import { ExternalNavigationParams , GLOBAL_HEADER_HEIGHT , LayoutChangeService } from '@hypertrace/common' ;
3
+ import { ExternalNavigationParams , LayoutChangeService } from '@hypertrace/common' ;
4
4
import { ButtonStyle } from '../../button/button' ;
5
5
import { IconSize } from '../../icon/icon-size' ;
6
- import { PopoverFixedPositionLocation , POPOVER_DATA } from '../../popover/popover' ;
6
+ import { POPOVER_DATA } from '../../popover/popover' ;
7
7
import { PopoverRef } from '../../popover/popover-ref' ;
8
8
import { SheetConstructionData } from '../overlay.service' ;
9
9
import { SheetOverlayConfig , SheetSize } from './sheet' ;
@@ -72,7 +72,6 @@ export class SheetOverlayComponent {
72
72
public constructor (
73
73
private readonly popoverRef : PopoverRef ,
74
74
@Inject ( POPOVER_DATA ) sheetData : SheetConstructionData ,
75
- @Inject ( GLOBAL_HEADER_HEIGHT ) globalHeaderHeight : string ,
76
75
layoutChange : LayoutChangeService
77
76
) {
78
77
const sheetConfig : SheetOverlayConfig = sheetData . config ;
@@ -85,7 +84,7 @@ export class SheetOverlayComponent {
85
84
86
85
this . isComponentSheet = ! ( sheetConfig . content instanceof TemplateRef ) ;
87
86
this . renderer = sheetConfig . content ;
88
- this . popoverRef . height ( this . getHeightForPopover ( globalHeaderHeight , sheetConfig . position ) ) ;
87
+ this . popoverRef . height ( '100vh' ) ;
89
88
this . setWidth ( ) ;
90
89
this . navigationParams = sheetConfig . pageNavParams ;
91
90
this . rendererInjector = Injector . create ( {
@@ -137,8 +136,4 @@ export class SheetOverlayComponent {
137
136
return '100%' ;
138
137
}
139
138
}
140
-
141
- private getHeightForPopover ( globalHeaderHeight : string , position ?: PopoverFixedPositionLocation ) : string {
142
- return position === PopoverFixedPositionLocation . Right ? '100vh' : `calc(100vh - ${ globalHeaderHeight } )` ;
143
- }
144
139
}
0 commit comments