mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
Matplotlib max-h fix so that plots are not cut off (#1550)
`object-fit:contain` only works with `max-h` if they are set on the same element. I moved `max-h` to `img` and also increased the height a bit such that the plot has enough space and can adapt to the container height. Fixes #1546
This commit is contained in:
parent
4048ac11b7
commit
fdbecafffb
@ -67,11 +67,11 @@
|
||||
<div id="bokehDiv"/>
|
||||
{:else if value && value["type"] == "matplotlib"}
|
||||
<div
|
||||
class="output-image w-full max-h-80 flex justify-center items-center relative"
|
||||
class="output-image w-full flex justify-center items-center relative"
|
||||
{theme}
|
||||
>
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img class="w-full h-full object-contain" src={value["plot"]} />
|
||||
<img class="w-full max-h-[30rem] object-contain" src={value["plot"]} />
|
||||
</div>
|
||||
{:else}
|
||||
<div class="h-full min-h-[15rem] flex justify-center items-center">
|
||||
|
Loading…
Reference in New Issue
Block a user