mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
ensure image is always drawn (#3386)
* ensure image is always drawn * fix demo * notebooks * clean
This commit is contained in:
parent
fba1bae3a5
commit
fc39cbdd9b
@ -4,7 +4,7 @@
|
||||
No changes to highlight.
|
||||
|
||||
## Bug Fixes:
|
||||
No changes to highlight.
|
||||
- Ensure uploaded images are always shown in the sketch tool by [@pngwn](https://github.com/pngwn) in [PR 3386](https://github.com/gradio-app/gradio/pull/3386)
|
||||
|
||||
## Documentation Changes:
|
||||
No changes to highlight.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
File diff suppressed because one or more lines are too long
@ -107,7 +107,11 @@
|
||||
let line_count = 0;
|
||||
|
||||
function draw_cropped_image() {
|
||||
if (!shape) return { x: 0, y: 0, width, height };
|
||||
if (!shape) {
|
||||
ctx.temp.drawImage(value_img, 0, 0, width, height);
|
||||
return;
|
||||
}
|
||||
|
||||
let _width = value_img.naturalWidth;
|
||||
let _height = value_img.naturalHeight;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user