Spaces:
Sleeping
Sleeping
tighten layout after loading images
Browse files
gradio_dualvision/app_template.py
CHANGED
@@ -231,6 +231,7 @@ class DualVisionApp(gr.Blocks):
|
|
231 |
const parentHeight = info.clientHeight;
|
232 |
images.forEach((img) => {{
|
233 |
img.style.maxHeight = `${{(parentHeight * {squeeze_viewport_height_pct}) / 100}}px`;
|
|
|
234 |
}});
|
235 |
}});
|
236 |
}}
|
|
|
231 |
const parentHeight = info.clientHeight;
|
232 |
images.forEach((img) => {{
|
233 |
img.style.maxHeight = `${{(parentHeight * {squeeze_viewport_height_pct}) / 100}}px`;
|
234 |
+
window.parentIFrame.size(0, null); // tighten the layout
|
235 |
}});
|
236 |
}});
|
237 |
}}
|