peepee
Version:
Visual Programming Language Where You Connect Ports Of One EventEmitter to Ports Of Another EventEmitter
29 lines (20 loc) • 654 B
JavaScript
import { Plugin } from 'plugin';
export class ConnectionManagerPlugin extends Plugin {
app;
subscriptions;
constructor() {
super();
this.subscriptions = new Set();
this.connectionInstances = new Map()
}
init(app) {
this.app = app;
this.svg = this.app.svg;
this.app.emit("registerTool", { name: "connect", data: { id: "connect-tool", icon: "bi-usb-plug", iconSelected: "bi-usb-plug-fill", description: "connect items" } });
this.loadStyleSheet(new URL("./style.css", import.meta.url).href);
}
stop() {
for (const unsubscribe of this.subscriptions) unsubscribe();
this.subscriptions.clear();
}
}