1.0.0-beta.1 • Published 5 years ago

rete-lifecycle-plugin v1.0.0-beta.1

Weekly downloads
68
License
MIT
Repository
github
Last release
5 years ago

Lifecycle

Rete.js plugin

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

import { OnCreated, OnDestroyed, OnConnect, OnConnected, OnDisconnect, OnDisconnected } from 'rete-lifecycle-plugin';

class AddComponent extends Rete.Component implements OnCreated, ...
1.0.0-beta.1

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago