Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix layout issue in vc u3 #677

Merged
merged 1 commit into from
Aug 28, 2019
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
@@ -1,5 +1,5 @@
.clr-wizard--inline {
height: 300px;
height: 100vh;
}
.spinner {
z-index: 10000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,13 @@ export class CreateVchWizardComponent implements OnInit {
// "context error" warning shows up during unit tests (but they still pass).
// this can be avoided by running the logic a tick later
setTimeout(() => {
const clrModalEl = p.document.querySelector('clr-modal');
const clrModalEl = p.document.querySelector('.modal-dialog');
// resize only if the parent modal is there. this prevents the unit tests from failing
if (clrModalEl === null) {
return;
}
const pluginIframeEl = <HTMLElement>clrModalEl.querySelector('plugin-iframe');
const targetIframeEl = <HTMLElement>clrModalEl.querySelector('iframe');
const modalContentEl = <HTMLElement>clrModalEl.querySelector('.modal-content');
const modalHeaderEl = <HTMLElement>clrModalEl.querySelector('.modal-header');
const modalBodyEl = <HTMLElement>clrModalEl.querySelector('.modal-body');
const modalDialogEl = <HTMLElement>clrModalEl.querySelector('.modal-dialog');
Expand All @@ -88,21 +87,19 @@ export class CreateVchWizardComponent implements OnInit {
modalHeaderEl.parentNode.removeChild(modalHeaderEl);
}

this.renderer.setElementStyle(modalDialogEl, 'height', '75vh');
if (modalDialogEl) {
this.renderer.setElementStyle(modalDialogEl, 'height', '75vh');
}

this.renderer.setElementStyle(modalBodyEl, 'height', '75vh');
this.renderer.setElementStyle(modalBodyEl, 'max-height', '75vh');
this.renderer.setElementStyle(targetIframeEl, 'width', '100%');
this.renderer.setElementStyle(targetIframeEl, 'height', '100%');
// wrapper element that encapsulates iframe tag
// available from 6.5u1
if (pluginIframeEl !== null) {
if (pluginIframeEl) {
this.renderer.setElementStyle(pluginIframeEl, 'height', '100%');
}
this.renderer.setElementStyle(
this.elRef.nativeElement.querySelector('clr-wizard'),
'height',
'100vh'
);

});
}

Expand Down