peepee
Version:
Visual Programming Language Where You Connect Ports Of One EventEmitter to Ports Of Another EventEmitter
30 lines (22 loc) • 512 B
JavaScript
import { Widgets } from 'widgets';
import { Plugin } from 'plugin';
export class WidgetManagerPlugin extends Plugin {
app;
subscriptions;
constructor() {
super();
this.subscriptions = new Set();
}
init(app) {
this.app = app;
this.svg = this.app.svg;
this.widgets = new Widgets(this.svg);
this.subscriptions.add(()=>this.widgets.stop());
}
start() {
}
stop() {
for (const unsubscribe of this.subscriptions) unsubscribe();
this.subscriptions.clear();
}
}