rete-angular-plugin
packageSignals that can be emitted by the plugin
type Produces<Schemes extends BaseSchemes> = {
data: Object;
type: "connectionpath";
};
Parameter | Extends | Description |
---|---|---|
Schemes | BaseSchemes |
Angular plugin. Renders nodes, connections and other elements using React.
class AngularPlugin<Schemes extends BaseSchemes, T extends unknown>
Parameter | Extends | Description |
---|---|---|
Schemes | BaseSchemes | |
T | unknown |
Extends Scope<Produces
Emits connectionpath
Listens render
unmount
constructor(params: { injector: Injector }): AngularPlugin<Schemes, T>
Parameter | Type | Description |
---|---|---|
params | { injector: Injector } | Plugin properties |
Returns AngularPlugin<Schemes, T>
Adds a preset to the plugin.
addPreset(preset: RenderPreset<Schemes, CanAssignEachTupleElemmentToAnyOf<T, UnionToTuple<K>> extends true ? K : "Cannot apply preset. Provided signals are not compatible">): void
Parameter | Type | Description |
---|---|---|
preset | RenderPreset<Schemes, CanAssignEachTupleElemmentToAnyOf<T, UnionToTuple<K>> extends true ? K : "Cannot apply preset. Provided signals are not compatible"> | Preset that can render nodes, connections and other elements. |
Returns void
Built-in presets, responsible for rendering different parts of the editor.
Classic preset for rendering nodes, connections, controls and sockets.
setup(props: ClassicProps<Schemes, K>): RenderPreset<Schemes, K>
Parameter | Type | Description |
---|---|---|
props | ClassicProps<Schemes, K> |
Returns RenderPreset<Schemes, K>
src/presets/context-menu/index.ts
src/presets/context-menu/index.ts
Preset for rendering context menu.
setup(props: { delay: number }): RenderPreset<Schemes, K>
Parameter | Type | Description |
---|---|---|
props | { delay: number } |
Returns RenderPreset<Schemes, K>
Preset for rendering minimap.
setup(props: { size: number }): RenderPreset<Schemes, K>
Parameter | Type | Description |
---|---|---|
props | { size: number } |
Returns RenderPreset<Schemes, K>
Preset for rendering pins.
setup(props: Props): RenderPreset<Schemes, K>
Parameter | Type | Description |
---|---|---|
props | Props |
Returns RenderPreset<Schemes, K>