put those inputs back again. made some thing async.

This commit is contained in:
Neil Graham
2023-12-01 22:13:56 +13:00
parent 3f2f8f70aa
commit d929a9afa9
2 changed files with 7 additions and 5 deletions
+2
View File
@@ -76,6 +76,8 @@ class Canvas_Tab:
def INPUT_TYPES(s):
return {
"required": {
"mask": ("CANVAS",),
"canvas": ("CANVAS",),
},
"hidden": {
"unique_id":"UNIQUE_ID",
+5 -5
View File
@@ -38,7 +38,7 @@ function checkAndClear(key) {
app.registerExtension({
name: "canvas_tab",
init() {
async init() {
console.log("init:"+this.name)
checkForExistingEditor();
const blankImage=document.createElement("canvas");
@@ -51,7 +51,8 @@ app.registerExtension({
async beforeRegisterNodeDef(nodeType, nodeData, app) {
},
getCustomWidgets(app) {
async getCustomWidgets(app) {
return {
CANVAS(node,inputName,inputData,app) {
return addCanvasWidget(node,inputName,inputData, app)
@@ -71,7 +72,6 @@ app.registerExtension({
addDragDropSupport(node);
}
}
});
@@ -82,12 +82,12 @@ function initEditorNode(node)
{
node.collected_images = [];
node.addWidget("button","Edit","bingo", (widget,graphCanvas, node, {x,y}, event) => focusEditor(node));
node.widgets.reverse();// because auto created widget get put in first
node.canvasWidget = node.widgets[1];
node.canvasWidget=node.widgets[1];
node.maskWidget=node.widgets[2];
console.log(node);
node.maskWidget.onTopOf = node.canvasWidget;
editor.channel.port1.postMessage({retransmit:true})