eo-display-canvas
<eo-display-canvas>
用于展示查看的画布构件。
Examples
Basic
Force layout
Dagre layout
Degraded diagram
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
cells | 用于查看的画布可以更新 | InitialCell[] | ||
layout | LayoutType | |||
layoutOptions | LayoutOptions | |||
defaultNodeSize | SizeTuple | [DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE] | ||
defaultNodeBricks | NodeBrickConf[] | |||
degradedThreshold | 当节点数量达到或超过 | number | 500 | |
degradedNodeLabel | 设置节点将降级展示时显示的名称。 | string | "<% DATA.node.id %>" | |
defaultEdgeLines | 使用条件判断设置默认的边对应的连线。在
| EdgeLineConf[] | ||
activeTarget | ActiveTarget | null | |||
fadeUnrelatedCells | 当鼠标悬浮到某节点上时,隐藏其他跟该节点无关的元素。 | boolean | ||
zoomable | boolean | true | ||
scrollable | boolean | true | ||
pannable | boolean | true | ||
scaleRange | RangeTuple | |||
hideZoomBar | 隐藏右下角放大缩小的控制栏 | boolean | ||
autoCenterWhenCellsChange | 每当 cells 改变时,重新自动居中 | boolean | ||
doNotResetActiveTargetForSelector | 选择器,点击该选择器对应的元素时不重置 | string | ||
doNotResetActiveTargetOutsideCanvas | 在画布外点击时不重置 | boolean |
Events
Name | Description | Event Detail |
---|---|---|
activeTarget.change | ActiveTarget | null | |
cell.contextmenu | CellContextMenuDetail | |
cell.click | CellContextMenuDetail |
Type references
BaseBrickCell
extends BaseCell
Name | Type | Required | Description |
---|---|---|---|
tag | "brick" | ||
useBrick | UseSingleBrickConf |
BaseCell
Name | Type | Required | Description |
---|---|---|---|
type | "node" | "edge" | "decorator" | ✅ | |
data | unknown |
BaseNodeCell
extends BaseCell
Name | Type | Required | Description |
---|---|---|---|
type | "node" | ✅ | |
id | NodeId | ✅ | |
containerId | NodeId | ||
view | NodeView | ✅ |
NodeView
extends InitialNodeView
Name | Type | Required | Description |
---|---|---|---|
width | number | ✅ | |
height | number | ✅ |