Add default badge for subgraph nodes

This commit is contained in:
filtered
2025-06-20 16:43:14 -07:00
parent 30ba624131
commit 0e25a55247

View File

@@ -1,5 +1,6 @@
import { import {
type IContextMenuValue, type IContextMenuValue,
LGraphBadge,
LGraphCanvas, LGraphCanvas,
LGraphEventMode, LGraphEventMode,
LGraphNode, LGraphNode,
@@ -92,6 +93,13 @@ export const useLitegraphService = () => {
this.#setInitialSize() this.#setInitialSize()
this.serialize_widgets = true this.serialize_widgets = true
void extensionService.invokeExtensionsAsync('nodeCreated', this) void extensionService.invokeExtensionsAsync('nodeCreated', this)
this.badges.push(
new LGraphBadge({
text: '⇌',
fgColor: '#dad0de',
bgColor: '#b3b'
})
)
} }
/** /**