Skip to content

Commit 839c7b4

Browse files
authored
fix layout issue in vc u3 (#677)
Signed-off-by: Meina Zhou <meinaz@vmware.com>
1 parent 04964fd commit 839c7b4

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

h5c/vic/src/vic-webapp/src/app/create-vch-wizard/create-vch-wizard.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.clr-wizard--inline {
2-
height: 300px;
2+
height: 100vh;
33
}
44
.spinner {
55
z-index: 10000;

h5c/vic/src/vic-webapp/src/app/create-vch-wizard/create-vch-wizard.component.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ export class CreateVchWizardComponent implements OnInit {
7272
// "context error" warning shows up during unit tests (but they still pass).
7373
// this can be avoided by running the logic a tick later
7474
setTimeout(() => {
75-
const clrModalEl = p.document.querySelector('clr-modal');
75+
const clrModalEl = p.document.querySelector('.modal-dialog');
7676
// resize only if the parent modal is there. this prevents the unit tests from failing
7777
if (clrModalEl === null) {
7878
return;
7979
}
8080
const pluginIframeEl = <HTMLElement>clrModalEl.querySelector('plugin-iframe');
8181
const targetIframeEl = <HTMLElement>clrModalEl.querySelector('iframe');
82-
const modalContentEl = <HTMLElement>clrModalEl.querySelector('.modal-content');
8382
const modalHeaderEl = <HTMLElement>clrModalEl.querySelector('.modal-header');
8483
const modalBodyEl = <HTMLElement>clrModalEl.querySelector('.modal-body');
8584
const modalDialogEl = <HTMLElement>clrModalEl.querySelector('.modal-dialog');
@@ -88,21 +87,19 @@ export class CreateVchWizardComponent implements OnInit {
8887
modalHeaderEl.parentNode.removeChild(modalHeaderEl);
8988
}
9089

91-
this.renderer.setElementStyle(modalDialogEl, 'height', '75vh');
90+
if (modalDialogEl) {
91+
this.renderer.setElementStyle(modalDialogEl, 'height', '75vh');
92+
}
93+
9294
this.renderer.setElementStyle(modalBodyEl, 'height', '75vh');
93-
this.renderer.setElementStyle(modalBodyEl, 'max-height', '75vh');
9495
this.renderer.setElementStyle(targetIframeEl, 'width', '100%');
9596
this.renderer.setElementStyle(targetIframeEl, 'height', '100%');
9697
// wrapper element that encapsulates iframe tag
9798
// available from 6.5u1
98-
if (pluginIframeEl !== null) {
99+
if (pluginIframeEl) {
99100
this.renderer.setElementStyle(pluginIframeEl, 'height', '100%');
100101
}
101-
this.renderer.setElementStyle(
102-
this.elRef.nativeElement.querySelector('clr-wizard'),
103-
'height',
104-
'100vh'
105-
);
102+
106103
});
107104
}
108105

0 commit comments

Comments
 (0)