rete-scopes-plugin
packageSignal types produced by ConnectionPlugin instance
type Scopes =
| { data: Object; type: "scopepicked" }
| { data: Object; type: "scopereleased" }
| { data: Object; type: "scopeupdated" };
Scope plugin. Responsible for user interaction with scopes (nested nodes, groups)
class ScopesPlugin<Schemes extends ExpectedScheme, T extends unknown>
Parameter | Extends | Description |
---|---|---|
Schemes | ExpectedScheme | |
T | unknown |
Extends Scope<Scopes, Requires
Emits scopepicked
scopereleased
Listens nodetranslated
noderemoved
Adds a preset to the plugin.
addPreset(preset: Preset): void
Parameter | Type | Description |
---|---|---|
preset | Preset | Preset that is responsible for user interactions with scopes (e.g. assigning nodes to scopes) |
Returns void
Presets for scopes plugin.
Classic preset allowing capturing a node by long-pressing it and dropping it onto another node to make it a nested.
setup(): Preset
Emits scopepicked
scopereleased
Listens nodepicked
nodetranslated
nodedragged
Returns Preset
Preset
Props for ScopesPlugin
class.
type Props = { exclude: Function; padding: Function; size: Function };