Type addDOMWidget (#2705)

This commit is contained in:
bymyself
2025-02-24 08:32:43 -07:00
committed by GitHub
parent 97f9d654b6
commit 81102604f5
3 changed files with 18 additions and 6 deletions

View File

@@ -432,11 +432,14 @@ export const useLitegraphService = () => {
host.el,
{
host,
// @ts-expect-error `getHeight` of image host returns void instead of number.
getHeight: host.getHeight,
onDraw: host.onDraw,
hideOnZoom: false
}
)
) as IWidget & {
options: { host: ReturnType<typeof createImageHost> }
}
widget.serializeValue = () => undefined
widget.options.host.updateImages(this.imgs)
}