Fix editor and consolidate file upload widget
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
uploaded: ComfyImageLocation[];
|
||||
upload_error: any;
|
||||
clear: undefined;
|
||||
image_clicked: undefined;
|
||||
}>();
|
||||
|
||||
if (value) {
|
||||
@@ -58,6 +59,10 @@
|
||||
dispatch("clear")
|
||||
}
|
||||
|
||||
function onImgClicked() {
|
||||
dispatch("image_clicked")
|
||||
}
|
||||
|
||||
interface GradioUploadResponse {
|
||||
error?: string;
|
||||
files?: Array<ComfyImageLocation>;
|
||||
@@ -205,6 +210,7 @@
|
||||
<ModifyUpload on:clear={handle_clear} absolute />
|
||||
<img src={convertComfyOutputToComfyURL(firstImage)}
|
||||
alt={firstImage.filename}
|
||||
on:click={onImgClicked}
|
||||
bind:this={imgElem}
|
||||
bind:naturalWidth={imgWidth}
|
||||
bind:naturalHeight={imgHeight}
|
||||
|
||||
Reference in New Issue
Block a user