0.3.2-alpha2 • Published 2 years ago

efficy-rete-connection-path-plugin v0.3.2-alpha2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Connection Path

Rete.js plugin

import ConnectionPathPlugin from 'rete-connection-path-plugin';

editor.use(ConnectionPathPlugin, {
    type: ConnectionPathPlugin.DEFAULT, // DEFAULT or LINEAR transformer
    transformer: () => ([x1, y1, x2, y2]) => [[x1, y1], [x2, y2]], // optional, custom transformer
    curve: ConnectionPathPlugin.curveBundle, // curve identifier
    options: { vertical: false, curvature: 0.4 }, // optional
    arrow: { color: 'steelblue', marker: 'M-5,-10 L-5,10 L20,0 z' }
});
PropertyDescriptionOptional
typeType of built-in transformer+
transformerCustom transformer+
curveany curve from d3-shape+
options{ vertical: Boolean, curvature: Number }+
arrowBoolean or { color, marker: /* path d attribute */ }+