Skip to content

Commit 0e25a55

Browse files
committed
Add default badge for subgraph nodes
1 parent 30ba624 commit 0e25a55

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/services/litegraphService.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type IContextMenuValue,
3+
LGraphBadge,
34
LGraphCanvas,
45
LGraphEventMode,
56
LGraphNode,
@@ -92,6 +93,13 @@ export const useLitegraphService = () => {
9293
this.#setInitialSize()
9394
this.serialize_widgets = true
9495
void extensionService.invokeExtensionsAsync('nodeCreated', this)
96+
this.badges.push(
97+
new LGraphBadge({
98+
text: '⇌',
99+
fgColor: '#dad0de',
100+
bgColor: '#b3b'
101+
})
102+
)
95103
}
96104

97105
/**

0 commit comments

Comments
 (0)