Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retejs/lifecycle-plugin
https://github.com/retejs/lifecycle-plugin
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/retejs/lifecycle-plugin
- Owner: retejs
- Created: 2018-12-19T21:03:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:39:06.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T00:54:46.583Z (21 days ago)
- Language: TypeScript
- Size: 355 KB
- Stars: 0
- Watchers: 3
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Lifecycle
====
#### Rete.js plugin```js
import LifecyclePlugin from 'rete-lifecycle-plugin';
editor.use(LifecyclePlugin);
class AddComponent extends Rete.Component {
constructor(){
super("Add");
}created(node) {
}destroyed(node) {
}onconnect(io) { // input or output
return false; // prevent connect
}ondisconnect(connection) {
return false; // prevent disconnect
}connected(connection) {
}disconnected(connection) {
}
}
```TypeScript
```ts
import { OnCreated, OnDestroyed, OnConnect, OnConnected, OnDisconnect, OnDisconnected } from 'rete-lifecycle-plugin';class AddComponent extends Rete.Component implements OnCreated, ...
```