rete-connection-reroute-plugin
packageSignal types produced by the plugin
tstype RerouteProduces = | { data: Object; type: "pintranslated" } | { data: Object; type: "pinselected" } | { data: Object; type: "pinunselected" };
Reroute plugin
tsclass ReroutePlugin<Schemes extends BaseSchemes>
Parameter | Extends | Description |
---|---|---|
Schemes | BaseSchemes |
Extends Scope<RerouteProduces, Requires<Schemes>, BaseArea<Schemes> | RerouteExtra>
Emits pintranslated
pinselected
pinunselected
Listens rendered
unmount
reordered
connectionpath
pointerdown
Add a new pin to the connection
tsadd(connectionId: string, position: Position, index: number): void
Parameter | Type | Description |
---|---|---|
connectionId | string | Connection id |
position | Position | Pin position |
index | number | Pin index, if not specified, the pin will be added to the end |
Returns void
Remove pin
tsremove(pinId: string): Promise<void>
Parameter | Type | Description |
---|---|---|
pinId | string | Pin id |
Returns Promise<void>
Select pin
tsselect(pinId: string): Promise<void>
Parameter | Type | Description |
---|---|---|
pinId | string | Pin id |
Returns Promise<void>
Translate pin
tstranslate(pinId: string, dx: number, dy: number): Promise<void>
Parameter | Type | Description |
---|---|---|
pinId | string | Pin id |
dx | number | Delta x |
dy | number | Delta y |
Returns Promise<void>
Unselect pin
tsunselect(pinId: string): Promise<void>
Parameter | Type | Description |
---|---|---|
pinId | string | Pin id |
Returns Promise<void>
Update connection for the pin
tsupdate(pin: string | PinStorageRecord): void
Parameter | Type | Description |
---|---|---|
pin | `string | PinStorageRecord` |
Returns void
Extensions for the connection reroute plugin
Enables synchronization between pins and the selector
tsselectablePins(reroutePlugin: ReroutePlugin<S>, selector: Selector<SelectorEntity>, accumulating: { active: unknown }): void
Listens pinselected
pinunselected
pintranslated
Parameter | Type | Description |
---|---|---|
reroutePlugin | ReroutePlugin<S> | Reroute plugin instance |
selector | Selector<SelectorEntity> | Selector instance |
accumulating | { active: unknown } | Accumulating state |
Returns void
Signal types consumed by the plugin
tstype RerouteExtra = | RenderSignal<"reroute-pins", { data: PinData }> | { data: Object; type: "unmount" };