From f000df9f2f95e0ede59f39966e6047ac6389f7d7 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 21 Apr 2026 17:18:06 +1000 Subject: [PATCH] fix for newly created nodes --- js/image_filter.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/image_filter.js b/js/image_filter.js index 48ae061..9ae73d6 100644 --- a/js/image_filter.js +++ b/js/image_filter.js @@ -6,7 +6,7 @@ import { popup, remove_preview } from "./popup.js"; import { graph_id_to_tab } from "./graph_map.js"; import { Log } from "./log.js"; -const FILTER_TYPES = ["Image Filter","Text Image Filter","Text Image Filter with Extras","Mask Image Filter"] +const FILTER_TYPES = ["Image Filter","Text Image Filter","Text Image Filter with Extras","Mask Image Filter", "Image Filter for List"] const VERSION = "1.8" @@ -117,6 +117,12 @@ app.registerExtension({ set_graph_id_widget(this) if (this.type == 'Mask Image Filter') remove_preview(this.id) } + const onNodeCreated = nodeType.prototype.onNodeCreated; + nodeType.prototype.onNodeCreated = function () { + const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined; + set_graph_id_widget(this) + return r + } } },