Skip to main content

plugins_controller

perfect-graph / Modules / plugins/controller

Module: plugins/controller#

Table of contents#

Namespaces#

Functions#

Functions#

useController#

â–¸ Const useController(useControllerData, _graphEditorRef?): readonly [Pick<GraphEditorProps, "nodes" | "edges" | "onEvent" | "graphConfig" | "eventHistory">, { onEvent: (eventInfo: EventInfo) => void ; update: (updater: UpdateFunction) => void }]

Graph Editor Controller. There are events handlers for the graph editor. It return the changed props.

Parameters#

NameType
useControllerDataPartial<ControllerState>
_graphEditorRef?MutableRefObject<GraphEditorRef>

Returns#

readonly [Pick<GraphEditorProps, "nodes" | "edges" | "onEvent" | "graphConfig" | "eventHistory">, { onEvent: (eventInfo: EventInfo) => void ; update: (updater: UpdateFunction) => void }]

Defined in#

plugins/controller/index.tsx:52