mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-06 12:30:29 +08:00
Ensure the statustracker for gr.Image
displays in static mode (#6213)
* fix image statustracker * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
a4a931dd39
commit
27194a987f
7
.changeset/curly-radios-battle.md
Normal file
7
.changeset/curly-radios-battle.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
"@gradio/app": patch
|
||||
"@gradio/image": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Ensure the statustracker for `gr.Image` displays in static mode
|
@ -433,10 +433,16 @@
|
||||
tick().then(() => {
|
||||
const outputs = dependencies[fn_index].outputs;
|
||||
outputs.forEach((id) => {
|
||||
if (instance_map[id].props.interactive && status.stage === "pending") {
|
||||
pending_outputs.push(id)
|
||||
if (
|
||||
instance_map[id].props.interactive &&
|
||||
status.stage === "pending"
|
||||
) {
|
||||
pending_outputs.push(id);
|
||||
instance_map[id].props.interactive = false;
|
||||
} else if (status.stage === "complete" && pending_outputs.includes(id)) {
|
||||
} else if (
|
||||
status.stage === "complete" &&
|
||||
pending_outputs.includes(id)
|
||||
) {
|
||||
instance_map[id].props.interactive = true;
|
||||
}
|
||||
});
|
||||
@ -564,11 +570,14 @@
|
||||
{} as Record<number, Record<string, number[]>>
|
||||
);
|
||||
async function handle_mount(): Promise<void> {
|
||||
let blocks_frontend_fn = new AsyncFunction(
|
||||
`let result = await (${js})();
|
||||
if (js) {
|
||||
let blocks_frontend_fn = new AsyncFunction(
|
||||
`let result = await (${js})();
|
||||
return (!Array.isArray(result)) ? [result] : result;`
|
||||
);
|
||||
blocks_frontend_fn();
|
||||
);
|
||||
blocks_frontend_fn();
|
||||
}
|
||||
|
||||
await tick();
|
||||
|
||||
var a = target.getElementsByTagName("a");
|
||||
|
@ -82,11 +82,9 @@
|
||||
{min_width}
|
||||
>
|
||||
<StatusTracker
|
||||
translucent={true}
|
||||
autoscroll={gradio.autoscroll}
|
||||
i18n={gradio.i18n}
|
||||
{...loading_status}
|
||||
show_progress="hidden"
|
||||
/>
|
||||
<StaticImage
|
||||
on:select={({ detail }) => gradio.dispatch("select", detail)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user