From d4c83e9c770375edfefb7c71444a8cf0903b80d1 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Tue, 26 Mar 2019 14:39:17 -0400 Subject: Fix iframe height bug iframes in workflows should no longer size incorrectly on initial load and page refresh Change-Id: Ic0765138e7c2f94603b69e8a8412ffa17817b2e7 Signed-off-by: Sawyer Bergeron --- .../src/templates/workflow/viewport-base.html | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'dashboard/src/templates/workflow') diff --git a/dashboard/src/templates/workflow/viewport-base.html b/dashboard/src/templates/workflow/viewport-base.html index f78bc01..1329595 100644 --- a/dashboard/src/templates/workflow/viewport-base.html +++ b/dashboard/src/templates/workflow/viewport-base.html @@ -84,12 +84,19 @@ background: #0FD57D; } - #viewport-iframe - { - height: calc(100vh - 450); - } - + .iframe_div { + width: calc(100% - 450px); + margin-left: 70px; + height: calc(100vh - 155px); + position: absolute; + border: none; + } + .iframe_elem { + width: 100%; + height: calc(100vh - 155px); + border: none; + } @@ -415,15 +422,7 @@ document.getElementById("view_message").className = "step_message"; document.getElementById("view_message").classList.add("message_" + stepstatus); } - function resize_iframe(){ - var page_rect = document.getElementById("wrapper").getBoundingClientRect(); - var title_rect = document.getElementById("iframe_header").getBoundingClientRect(); - var iframe_height = page_rect.bottom - title_rect.bottom; - document.getElementById("viewport-iframe").height = iframe_height; - } - window.addEventListener('load', resize_iframe); - window.addEventListener('resize', resize_iframe); @@ -433,5 +432,7 @@ - +
+ +
{% endblock content %} -- cgit 1.2.3-korg