mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-11 11:19:58 +08:00
Ensure ImageEditor brush colour is updated when changed (#10041)
* fix selected_color logic * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
This commit is contained in:
parent
d0b74ba281
commit
c1fa13c9c0
6
.changeset/twenty-swans-help.md
Normal file
6
.changeset/twenty-swans-help.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/imageeditor": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Ensure ImageEditor brush colour is updated when changed
|
@ -47,12 +47,11 @@
|
||||
? colors.map(process_color).filter((_, i) => i < 4)
|
||||
: [];
|
||||
|
||||
$: selected_color =
|
||||
default_color === "auto"
|
||||
? processed_colors[0]
|
||||
: !default_color
|
||||
? "black"
|
||||
: process_color(default_color);
|
||||
let selected_color = process_color(default_color || "#000000");
|
||||
|
||||
$: if (mode === "draw") {
|
||||
current_color.set(selected_color);
|
||||
}
|
||||
|
||||
let brush_options: brush_option_type = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user