toshas commited on
Commit
7f9dd32
·
1 Parent(s): 157001c

tighten layout after loading images

Browse files
Files changed (1) hide show
  1. gradio_dualvision/app_template.py +1 -0
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
  }}