Skip to content

Commit

Permalink
Ensure ImageEditor brush color can be updated with gr.update (#8802)
Browse files Browse the repository at this point in the history
* fix brush

* add changeset

* fix brush

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
pngwn and gradio-pr-bot authored Jul 16, 2024
1 parent b0aa87c commit 7b19474
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/silver-emus-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/imageeditor": patch
"gradio": patch
---

fix:Ensure `ImageEditor` brush color can be updated with `gr.update`
4 changes: 2 additions & 2 deletions js/imageeditor/shared/tools/Brush.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
export let color_mode: Brush["color_mode"] | undefined = undefined;
export let mode: "erase" | "draw";
const processed_colors = colors
$: processed_colors = colors
? colors.map(process_color).filter((_, i) => i < 4)
: [];
let selected_color =
$: selected_color =
default_color === "auto"
? processed_colors[0]
: !default_color
Expand Down

0 comments on commit 7b19474

Please sign in to comment.