Skip to content

sfe-efficy/connection-path-plugin

 
 

Repository files navigation

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 */ } +

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%