@naetverkjs/lifecycle
v0.8.54
Published
The lifecycle plugin registers additional events that can be used while working with a component
Downloads
4
Maintainers
Readme
lifecycle-plugin
The lifecycle plugin registers additional events that can be used while working with a component
Install
import { LifecyclePlugin } from '@naetverkjs/lifecycle';
editor.use(LifecyclePlugin);
New component methods
created(node) {
}
destroyed(node) {
}
onconnect(io) { // input or output
return false; // prevent connect
}
ondisconnect(connection) {
return false; // prevent disconnect
}
connected(connection) {
}
disconnected(connection) {
}
Usage:
import { OnCreated, OnDestroyed, OnConnect, OnConnected, OnDisconnect, OnDisconnected } from 'rete-lifecycle-plugin';
class AddComponent extends Naetverk.Component implements OnCreated, ...