retejs / rete

JavaScript framework for visual programming
https://retejs.org
MIT License
10.17k stars 653 forks source link

Add `setMeta()` method to Node #548

Closed danilopolani closed 2 years ago

danilopolani commented 3 years ago

The PR implements a setMeta() method for Nodes to chain it in the component builder:

class MyComponent extends Rete.Component {
    constructor () {
        super('Component name');
    }

    builder (node) {
        return node
            .setMeta({ foo: 'bar' })
            .addControl(...)
            .addInput(...)
            .addOutput(...);
    }
}
ChBernat commented 2 years ago

Any idea when will it be merged?