mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +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:
@@ -84,11 +84,9 @@ app.registerExtension({
|
||||
|
||||
const img = new Image()
|
||||
img.onload = () => {
|
||||
// @ts-expect-error adding extra property
|
||||
node.imgs = [img]
|
||||
app.graph.setDirtyCanvas(true)
|
||||
requestAnimationFrame(() => {
|
||||
// @ts-expect-error accessing extra property
|
||||
node.setSizeForImage?.()
|
||||
})
|
||||
}
|
||||
@@ -109,7 +107,6 @@ app.registerExtension({
|
||||
camera.serializeValue = async () => {
|
||||
if (captureOnQueue.value) {
|
||||
capture()
|
||||
// @ts-expect-error accessing extra property
|
||||
} else if (!node.imgs?.length) {
|
||||
const err = `No webcam image captured`
|
||||
useToastStore().addAlert(err)
|
||||
|
||||
Reference in New Issue
Block a user