Skip to content

Commit 09b0ed6

Browse files
committed
can now unregister from publishers
1 parent a53a496 commit 09b0ed6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@elicdavis/node-flow",
33
"description": "build node graphs",
44
"author": "Eli C Davis",
5-
"version": "0.1.6",
5+
"version": "0.1.7",
66
"license": "MIT",
77
"keywords": [
88
"nodes",

src/nodes/publisher.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export class Publisher {
4646
this.#registeredNodes.set(nodeType, config);
4747
}
4848

49+
unregister(nodeType: string): boolean {
50+
return this.#registeredNodes.delete(nodeType);
51+
}
52+
4953
#recurseBuildMenu(graph: NodeSubsystem, name: string, subMenu: Map<string, FlowNodeConfig>, position: Vector2): ContextMenuConfig {
5054
const items: Array<ContextMenuItemConfig> = [];
5155
const subMenus = new Map<string, Map<string, FlowNodeConfig>>();

0 commit comments

Comments
 (0)