How to use the rete.NodeEditor function in rete

To help you get started, we’ve selected a few rete examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github retejs / rete.js.org / src / rete / index.js View on Github external
export async function initialize(container, connOptions = {}, renderOptions = {}) {
    const editor = new NodeEditor('retejs@0.1.0', container);

    editor.use(ConnectionPlugin, connOptions);
    editor.use(VueRenderPlugin, renderOptions);

    const engine = new Engine('retejs@0.1.0');
    
    editor.on('process nodecreated noderemoved connectioncreated connectionremoved', async () => {
        if(editor.silent) return;
        
        await engine.abort();
        await engine.process(editor.toJSON());
    });

    return {
        editor,
        engine,
github Ni55aN / allmatter / src / components / NodeEditor / index.vue View on Github external
initEditor() {
            this.editor = new NodeEditor(ID, this.$refs.area);
            this.engine = new Engine(ID);

            this.editor.use(VueRenderPlugin);
            this.editor.use(ConnectionPlugin);
            this.editor.use(AreaPlugin);
            this.editor.use(ContextMenuPlugin, { 
                delay: 100,
                allocate(component) {
                    return component.allocation || [];
                }
            });
            this.editor.use(ModulePlugin, {
                engine: this.engine,
                modules: this.$refs.modules.list
            });

rete

JavaScript framework

MIT
Latest version published 3 months ago

Package Health Score

82 / 100
Full package analysis