API for rete-connection-path-plugin package - Rete.js

API for rete-connection-path-plugin package

Transformers

transformers.ts

Built-in transformers, defining the auxiliary points for the path.

classic

transformers.ts

Classic transformer. Returns four points: start, auxiliary start, auxiliary end, end.

ts
classic(options: { curvature: number, vertical: boolean }): Transformer
ParameterTypeDescription
options{ curvature: number, vertical: boolean }Options

Returns Transformer Four points

linear

transformers.ts

Linear transformer. Returns the same points.

ts
linear(): Transformer

Throws Error if number of points is not equal to 2

Returns Transformer Two points

ConnectionPathPlugin

index.ts

Connection path plugin. Allows to customize connection path and arrow.

ts
class ConnectionPathPlugin<Schemes extends BaseSchemes, K extends unknown>
ParameterExtendsDescription
SchemesBaseSchemes
Kunknown

Extends Scope<never, RenderProduces, ...Area2DInherited<Schemes, K>>

Listens connectionpath rendered

constructor

index.ts

ts
constructor(props: Props<Schemes>): ConnectionPathPlugin<Schemes, K>
ParameterTypeDescription
propsProps<Schemes>Connection path plugin props

Returns ConnectionPathPlugin<Schemes, K>

Props

index.ts

Connection path plugin props

ts
type Props<Schemes extends BaseSchemes> = {
  arrow: Function;
  curve: Function;
  transformer: Function;
};
ParameterExtendsDescription
SchemesBaseSchemes