跳转到内容

pivotick v3.0.0


拓展 / GraphUI / NeighborsPanel

接口: NeighborsPanel ​

定义于:interfaces/GraphUI.ts:893

表示图形 UI 侧栏中邻居面板的配置

定义如何计算和显示节点和边的邻居。

默认值 ​

ts
All neighbor for the chosen entity

属性 ​

enabled? ​

optional enabled: boolean

定义于:interfaces/GraphUI.ts:899

侧边栏是否显示邻居面板。 false 删除它及其分隔符——对于边缘没有什么值得列出的图来说是正确的。

默认值 ​

ts
true

graph? ​

optional graph: NeighborsGraphOptions

定义于:interfaces/GraphUI.ts:913

面板相邻图的选项,否则使用主图的渲染选项进行绘制。

示例 ​

ts
// Small plain nodes in the panel, never zoomed past 1×.
graph: { render: { nodeStyleMap: plainStyles, maxZoom: 1 }, layout: { radialGap: 80 } }

render? ​

optional render: string | HTMLElement | (element, ctx) => RenderResult

定义于:interfaces/GraphUI.ts:905

备注 ​

返回的 string 呈现为纯文本;返回 HTMLElement 来渲染 HTML。可能是async:槽显示一个占位符,直到它解析,并且选择移动后到达的结果被删除。