Fix drawing img on collapsed nodes

This commit is contained in:
pythongosssss 2023-02-25 12:41:36 +00:00 committed by GitHub
parent d4486f8284
commit b6487b3ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,6 +265,7 @@ function onObjectInfo(json) {
}
MyNode.prototype.onDrawBackground = function(ctx) {
if(!this.flags.collapsed) {
const output = nodeOutputs[this.id + ""];
if(output && output.images) {
const src = output.images[0];
@ -300,6 +301,7 @@ function onObjectInfo(json) {
ctx.drawImage(this.img, x, y, w, h);
}
}
}
};
}