Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@import 'src/theming/variables';

$form-min-width: 732px;
$form-height: 993px;

:host {
container-type: size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
AfterViewInit,
Component,
ElementRef,
HostListener,
Inject,
OnDestroy,
OnInit,
Expand Down Expand Up @@ -115,6 +116,7 @@ interface DialogData {
export class DeviceQualificationFromComponent
implements OnInit, AfterViewInit, OnDestroy
{
readonly FORM_HEIGHT = 993;
readonly TestingType = TestingType;
readonly DeviceView = DeviceView;
readonly ProgramType = ProgramType;
Expand Down Expand Up @@ -179,6 +181,11 @@ export class DeviceQualificationFromComponent
return device1 && device2 && this.compareDevices(device1, device2);
}

@HostListener('window:resize', ['$event'])
onResize() {
this.setDialogHeight();
}

constructor(
private fb: FormBuilder,
private deviceValidators: DeviceValidators,
Expand Down Expand Up @@ -556,4 +563,13 @@ export class DeviceQualificationFromComponent
}
return true;
}

private setDialogHeight(): void {
const windowHeight = window.innerHeight;
if (windowHeight < this.FORM_HEIGHT) {
this.element.nativeElement.style.height = '100vh';
} else {
this.element.nativeElement.style.height = this.FORM_HEIGHT + 'px';
}
}
}