mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
Add pricing badge when a subgraph contains partner nodes (#6354)
<img width="596" height="213" alt="image" src="https://github.com/user-attachments/assets/174c5461-f638-42de-b3ad-0e108dee3983" />  ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6354-Add-pricing-badge-when-a-subgraph-contains-partner-nodes-29b6d73d365081c685bec3e9446970eb) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1710,6 +1710,14 @@ export class LGraph
|
||||
|
||||
subgraphNode._setConcreteSlots()
|
||||
subgraphNode.arrange()
|
||||
this.canvasAction((c) =>
|
||||
c.canvas.dispatchEvent(
|
||||
new CustomEvent('subgraph-converted', {
|
||||
bubbles: true,
|
||||
detail: { subgraphNode: subgraphNode as SubgraphNode }
|
||||
})
|
||||
)
|
||||
)
|
||||
return { subgraph, node: subgraphNode as SubgraphNode }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ export interface LGraphCanvasEventMap {
|
||||
fromNode: SubgraphNode
|
||||
}
|
||||
|
||||
/** Dispatched after a group of items has been converted to a subgraph*/
|
||||
'subgraph-converted': {
|
||||
subgraphNode: SubgraphNode
|
||||
}
|
||||
|
||||
'litegraph:canvas':
|
||||
| { subType: 'before-change' | 'after-change' }
|
||||
| {
|
||||
|
||||
Reference in New Issue
Block a user