efficy-rete-connection-path-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.3.2-alpha2 • Public • Published

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' }
});
Property Description Optional
type Type of built-in transformer +
transformer Custom transformer +
curve any curve from d3-shape +
options { vertical: Boolean, curvature: Number } +
arrow Boolean or { color, marker: /* path d attribute */ } +

Readme

Keywords

none

Package Sidebar

Install

npm i efficy-rete-connection-path-plugin

Weekly Downloads

5

Version

0.3.2-alpha2

License

MIT

Unpacked Size

58.3 kB

Total Files

17

Last publish

Collaborators

  • samuelfa