pivotick / GraphUI / PropertiesPanel
Interface: PropertiesPanel
Defined in: interfaces/GraphUI.ts:843
Represents the configuration for the properties panel in the graph UI's sidebar
Defines how to compute and display properties for nodes and edges.
Default
All key/value pairs from node.getData() or edge.getData()Properties
edgePropertiesMap()
edgePropertiesMap: (
edge,ctx) =>PropertyEntry[] |Promise<PropertyEntry[]>
Defined in: interfaces/GraphUI.ts:867
A function that computes the list of edge properties to display.
May be async — return a promise of the entries and the panel shows a placeholder until it resolves.
Parameters
edge
ctx
Returns
PropertyEntry[] | Promise<PropertyEntry[]>
Default
All key/value pairs from edge.getData()enabled?
optionalenabled:boolean
Defined in: interfaces/GraphUI.ts:849
Whether the sidebar shows a properties panel at all. false removes it and its separator, leaving the header, the neighbours panel and any extra panels.
Default
truenodePropertiesMap()
nodePropertiesMap: (
node,ctx) =>PropertyEntry[] |Promise<PropertyEntry[]>
Defined in: interfaces/GraphUI.ts:858
A function that computes the list of node properties to display.
May be async — return a promise of the entries and the panel shows a placeholder until it resolves.
Parameters
node
ctx
Returns
PropertyEntry[] | Promise<PropertyEntry[]>
Default
All key/value pairs from node.getData()render?
optionalrender:string|HTMLElement| (element,ctx) =>FallbackRenderResult
Defined in: interfaces/GraphUI.ts:884
Custom renderer for the property panel. This content will override the default sidebar property panel.
Default
undefinedExamples
(element) => `element id: ${element.id}`// A custom view for a lone node, the aggregated table for everything else.
(element) => (element instanceof Node) ? viewFor(element) : undefinedRemarks
A returned string renders as plain text; return an HTMLElement to render HTML. May be async: the slot shows a placeholder until it resolves, and a result arriving after the selection moved on is dropped.
Return (or resolve to) undefined to hand the selection back to the default panel: the nodePropertiesMap / edgePropertiesMap rows for one element, the aggregated table for several. Return null to draw nothing.