mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 02:34:10 +00:00
[Refactor] Clean up image nodes, add TS types (#1927)
* [Refactor] Clean up image nodes, add TS types Should be no functional changes. * Remove unused code
This commit is contained in:
@@ -508,7 +508,6 @@ export const ComfyWidgets: Record<string, ComfyWidgetConstructor> = {
|
||||
function showImage(name) {
|
||||
const img = new Image()
|
||||
img.onload = () => {
|
||||
// @ts-expect-error
|
||||
node.imgs = [img]
|
||||
app.graph.setDirtyCanvas(true)
|
||||
}
|
||||
@@ -521,7 +520,6 @@ export const ComfyWidgets: Record<string, ComfyWidgetConstructor> = {
|
||||
img.src = api.apiURL(
|
||||
`/view?filename=${encodeURIComponent(name)}&type=input&subfolder=${subfolder}${app.getPreviewFormatParam()}${app.getRandParam()}`
|
||||
)
|
||||
// @ts-expect-error
|
||||
node.setSizeForImage?.()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user