From 458941c508f11d43debf1cef6950f330145e336d Mon Sep 17 00:00:00 2001 From: Hannah Date: Wed, 27 Nov 2024 20:03:12 +0000 Subject: [PATCH] Allow full screen mode in interactive gr.Image (#10054) * allow full screen mode in interactive image * add changeset --------- Co-authored-by: gradio-pr-bot Co-authored-by: Abubakar Abid --- .changeset/dirty-cloths-heal.md | 6 +++ js/image/shared/ClearImage.svelte | 18 --------- js/image/shared/ImageUploader.svelte | 55 ++++++++++++++++++++++------ 3 files changed, 49 insertions(+), 30 deletions(-) create mode 100644 .changeset/dirty-cloths-heal.md delete mode 100644 js/image/shared/ClearImage.svelte diff --git a/.changeset/dirty-cloths-heal.md b/.changeset/dirty-cloths-heal.md new file mode 100644 index 0000000000..c823827f0c --- /dev/null +++ b/.changeset/dirty-cloths-heal.md @@ -0,0 +1,6 @@ +--- +"@gradio/image": minor +"gradio": minor +--- + +feat:Allow full screen mode in interactive gr.Image diff --git a/js/image/shared/ClearImage.svelte b/js/image/shared/ClearImage.svelte deleted file mode 100644 index 8726267bbd..0000000000 --- a/js/image/shared/ClearImage.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - - - { - dispatch("remove_image"); - event.stopPropagation(); - }} - /> - diff --git a/js/image/shared/ImageUploader.svelte b/js/image/shared/ImageUploader.svelte index 75c7780083..3e3916b28b 100644 --- a/js/image/shared/ImageUploader.svelte +++ b/js/image/shared/ImageUploader.svelte @@ -1,7 +1,7 @@ -
- {#if value?.url && !active_streaming} - { - value = null; - dispatch("clear"); - }} - /> - {/if} +
+ + {#if value?.url && !active_streaming} + {#if !is_full_screen && show_fullscreen_button} + + {/if} + {#if is_full_screen && show_fullscreen_button} + + {/if} + { + value = null; + dispatch("clear"); + event.stopPropagation(); + }} + /> + {/if} +
1}