docs: add data docs

This commit is contained in:
Yanyan-Wang 2023-11-10 18:43:02 +08:00
parent 9aaa29c98d
commit fe7dcbb528
68 changed files with 3505 additions and 1928 deletions

View File

@ -85,7 +85,6 @@ export interface Encode<T> {
export interface ShapeAttrEncode { export interface ShapeAttrEncode {
[shapeAttr: string]: unknown | Encode<unknown>; [shapeAttr: string]: unknown | Encode<unknown>;
animates?: IAnimates | Encode<IAnimates>;
} }
export interface LabelBackground { export interface LabelBackground {
@ -102,7 +101,6 @@ export interface ShapesEncode {
otherShapes?: { otherShapes?: {
[shapeId: string]: { [shapeId: string]: {
[shapeAtrr: string]: unknown | Encode<unknown>; [shapeAtrr: string]: unknown | Encode<unknown>;
animates: IAnimates | Encode<IAnimates>;
}; };
}; };
} }

View File

@ -154,39 +154,9 @@ export interface NodeShapeStyles extends ItemShapeStyles {
}; };
}; };
anchorShapes?: ShapeStyle & { anchorShapes?: ShapeStyle & {
/**
* Background color of the anchor.
*/
color?: string;
/**
* Color of the text in anchor.
*/
textColor?: string;
/**
* Size of the text in anchor.
*/
size?: number;
/**
* The x-axis offset of the text relative to the current position
*/
offsetX?: number;
/**
* The y-axis offset of the text relative to the current position
*/
offsetY?: number;
/**
* The z-axis offset of the text relative to the current position
*/
offsetZ?: number;
// individual styles and their position // individual styles and their position
[key: number]: ShapeStyle & { [key: number]: ShapeStyle & {
position?: BadgePosition; position?: 'top' | 'left' | 'bottom' | 'right' | [number, number];
color?: string;
textColor?: string;
size?: number;
offsetX?: number;
offsetY?: number;
offsetZ?: number;
}; };
}; };
} }

View File

@ -152,7 +152,7 @@ const getDefaultEdgeAnimates = (delay?: number) => ({
const defaultTheme = { const defaultTheme = {
// : ThemeOptionsOf<any> // : ThemeOptionsOf<any>
type: 'spec', type: 'spec',
base: 'light', base: 'dark',
specification: { specification: {
node: { node: {
dataTypeField: 'cluster', dataTypeField: 'cluster',
@ -179,6 +179,7 @@ const create2DGraph = (
'data-format': dataFormat, 'data-format': dataFormat,
}, },
}); });
console.log('theme', { ...defaultTheme, ...theme });
const graph = new ExtGraph({ const graph = new ExtGraph({
container: container as HTMLElement, container: container as HTMLElement,
// width, // width,
@ -186,7 +187,7 @@ const create2DGraph = (
width: 1150, width: 1150,
height: 400, height: 400,
renderer: 'webgl', renderer: 'webgl',
rendererType, // rendererType,
data: dataFor2D, data: dataFor2D,
transforms: [ transforms: [
'data-format', 'data-format',
@ -278,6 +279,21 @@ const create2DGraph = (
}, },
}; };
}, },
nodeState: {
active: {
haloShape: {
lineWidth: 3,
},
},
selected: {
keyShape: {
lineWidth: 0.5,
},
haloShape: {
lineWidth: 3,
},
},
},
}); });
// graph.zoom(0.15); // graph.zoom(0.15);

View File

@ -0,0 +1,238 @@
---
title: ComboDisplayModel
order: 12
---
ComboDisplayModelCombo Display/Rendering Data is the result of mapping the ComboModel (inner model) through the mapper configuration specified on the graph instance ([specification.combo](../graph/Specification.en.md#combo)), and is only consumed for internal rendering. You won't consume it anywhere else. The data type inherits the ComboModel data type [`ComboModel`](./ComboModel.en.md) from the internal data flow and is extended as follows:
```typescript
interface ComboDisplayModel {
id: string | number;
data: ComboDisplayModelData; // extends ComboModelData
}
```
## id
The unique ID of the Combo. The ID cannot be modified once the Combo is created.
- **Required**: True;
- **Type**: `string|number`
## data
The data in ComboDisplayModelData is the result of mapping the ComboModel data through the mapper configuration specified on the graph instance ([specification.combo](../graph/Specification.en.md#combo)). It should contain all the contents of ComboModel along with additional graphic style configurations.
- **Required**: True;
- **Type**: [`ComboDisplayModelData`](#combodisplaymodeldatalodlevels), extended from [`ComboModel`](./ComboModel.en.md#combomodeldatatype), with additional properties as described below:
### ComboDisplayModelData.lodLevels
Specifies the zoom level divisions for the Combo. It is an array of zoom level range coefficients, representing the division of zoom levels. One of the levels should have `primary: true`, indicating that it has a level index of 0. The level indices decrease for levels with `zoomRange` less than the current level, and increase for levels with `zoomRange` greater than the current level. The level index corresponds to the `lod` value in the graphics configuration below.
- **Required**: False;
- **Type**: `LodLevel`[], where `LodLevel` is defined as follows:
| Name | Type | Description |
| :---------- | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `zoomRange` | `[number, number]` | The zoom level range defined for this level. When the graph zoom level zoom >= zoomRange[0] && zoom < zoomRange[1], it indicates that the node is in this level |
| `primary` | `boolean` | Whether it is the primary level. If `true`, it means that the level number is 0. Levels with smaller this `zoomRange` values have decreasing level numbers, while levels with larger this `zoomRange` values have increasing level numbers. In the `NodeDisplayModelData.lodLevels` array, there should be only one level with `primary: true`. And the level number corresponds to the `lod` value in the shape style configurations below |
### ComboDisplayModelData.animates
Configuration of graphic animations when the node appears, disappears, shows, hides, or updates. Supports sequential execution of multiple animations (order). [Animation Demo](/en/examples/scatter/changePosition/#itemAnimates).
- **Required**: False;
- **Type**: `IAnimates`, defined as follows:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // Animations when certain graphics are created in the combo
buildOut?: IAnimate[]; // Animations when certain graphics are destroyed in the combo
show?: IAnimate[]; // Animations when certain graphics transition from hidden to visible in the combo
hide?: IAnimate[]; // Animations when certain graphics transition from visible to hidden in the combo
update?: (IAnimate | IStateAnimate)[]; // Animations when certain graphics undergo data or state updates in the combo
}
```
In this, `IAnimate` is defined as follows:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | The names of the graphic style properties related to this animation, for example `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | The ID of the graphic on which the animation needs to be performed. If not specified, it represents the animation on the entire graphic group |
| `IAnimate.order?` | `number` | `0` | The order in which this animation is executed among `IAnimate[]`, allowing for sequential playback of multiple animations during one update |
| `IAnimate.duration?` | `number` | `500` | The duration of this animation, the smaller the value, the faster the animation speed |
| `IAnimate.iterations?` | `number` | `1` | The number of times this animation is executed, -1 represents looping execution |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | The easing function of this animation, the possible values can be referred to [MDN easing definition](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` is defined as follows, which adds a field `states` specifying the states in which this animation is executed to `IAnimate`:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### ComboDisplayModelData.keyShape
The style configuration of the key shape of the Combo. The key shape of the Combo represents its primary form and is also used to calculate the incoming position of edges.
- **Required**: False;
- **Type**: `ShapeStyle`, and the configuration options for different key shapes are different. For example, the key shape of `'circle-combo'` is `'circle'` (refer to [Circle Shape Style](../shape/CircleStyleProps.en.md)), and the key shape of `'rect-combo'` is `'rect'` (refer to [Rect Shape Style](../shape/RectStyleProps.en.md)).
### ComboDisplayModelData.haloShape
In the built-in Combo and themes, `haloShape` refers to the halo effect displayed around the key shape (`keyShape`) of the Combo in the `active` state (usually triggered when the mouse hovers) and `selected` state (usually triggered when selected). In the logic of the built-in Combo, the type and color of the `haloShape` follow the key shape (`keyShape`).
- **Required**: False;
- **Type**: `ShapeStyle`, where the type of haloShape follows the key shape (keyShape). The configuration options for different key shapes are different. For example, the key shape of `'circle-combo'` is `'circle'` (refer to [Circle Shape Style](../shape/CircleStyleProps.en.md)), and the key shape of `'rect-combo'` is `'rect'` (refer to [Rect Shape Style](../shape/RectStyleProps.en.md)).
### ComboDisplayModelData.labelShape
The text shape of the Combo, supported by built-in Combo or custom Combo that inherits the built-in Combo (without overriding related content).
- **Required**: False;
- **Type**:
```typescript
TextStyleProps & {
/**
* The position of the text relative to the key shape (keyShape) of the Combo. It can specify the position and whether it is inside or outside the combo.
*/
position?: 'top' | 'bottom' | 'left' | 'right' | 'left-top' | 'ouside-top'| 'ouside-left' | 'ouside-right' | 'ouside-bottom';
/**
* The offset of the text shape from the key shape (keyShape) in the x-direction.
*/
offsetX?: number;
/**
* The offset of the text shape from the key shape (keyShape) in the y-direction.
*/
offsetY?: number;
/**
* The offset of the text shape from the key shape (keyShape) in the z-direction.
*/
offsetZ?: number;
/**
* The maximum width allowed for the text. If specified as a number, it represents the pixel value. If specified as text with '%', it represents the percentage relative to the size of the key shape (keyShape). The default value is '200%', which means that the maximum width of the text shape cannot exceed twice the width of the key shape. If it exceeds, it will be automatically truncated and ellipsis '...' will be added at the end.
*/
maxWidth?: string | number;
/**
* The rotation angle of the text (in radians).
*/
angle?: number;
};
```
The related shape style can be referred to as [`TextStyleProps` Text Shape Style](../shape/TextStyleProps.en.md)。
### ComboDisplayModelData.labelBackgroundShape
The background shape of the text in the Combo, which is a rectangle. If not set, it will not be displayed. Setting it as `{}` will use the default style in the theme to display the text background shape.
- **Required**: False;
- **Type**:
```typescript
ShapeStyle & {
padding?: number | number[]; // The padding distance between the text and the background rectangle in all directions
};
```
The related shape style can be referred to as RectStyleProps [`RectStyleProps`](../shape/RectStyleProps.en.md).
### ComboDisplayModelData.badgeShapes
The badges on the four sides of the Combo, where a single badge includes the Combo and background shape. `badgeShapes` configures multiple badges.
- **Required**: False;
- **Type**:
```typescript
{
/**
* The background color of the badge (applies to all badges, lower priority than the color setting of individual badges below)
*/
color?: string;
/**
* The color palette of the badge background, which means that the badges below will automatically take colors from this palette.
* Lower priority than the color setting of individual badges below.
*/
palette?: string[];
/**
* The text color of the badge (applies to all badges, lower priority than the textColor setting of individual badges below)
*/
textColor?: string;
/**
* The style configuration of individual badges, which overrides the above configurations.
*/
[key: number]: ShapeStyle & {
/**
* The position of the badge, supported values are described below
*/
position?: IBadgePosition;
/**
* The background color of the badge
*/
color?: string;
/**
* The text color of the badge
*/
textColor?: string;
};
}
```
`BadgePosition` can have the following values:
| Value | Description |
| :-------------- | :------------------------------------------- |
| `'rightTop'` | Top right corner, recommended |
| `'right'` | Middle right, recommended |
| `'rightBottom'` | Bottom right corner, recommended |
| `'leftTop'` | Top left corner |
| `'left'` | Middle left |
| `'leftBottom'` | Bottom left corner |
| `'bottom'` | Middle bottom |
| `'top'` | Middle top |
| `'bottomRight'` | Bottom right corner, same as `'rightBottom'` |
| `'bottomLeft'` | Bottom left corner, same as `'leftBottom'` |
| `'topRight'` | Top right corner, same as `'rightTop'` |
| `'topLeft'` | Top left corner, same as `'leftTop'` |
### ComboDisplayModelData.anchorShapes
The circular shapes (anchor shapes) at the four sides of the Combo represent the entry points for connections. The anchorShapes configuration specifies multiple anchor shapes.
- **Required**: False;
- **Type**:
```typescript
// The outer layer configures the style of all anchor shapes (circles), with lower priority than the individual anchor shape configurations.
CircleStyleProps & {
// Individual anchor shape configurations, with higher priority than the outer CircleStyleProps.
[key: number]: CircleStyleProps & {
// The position of the anchor shape, can be configured as a string or a number array representing the percentage position relative to the bounding box of the key shape (keyShape). For example, [0.5, 1] means it is located at the right center of the key shape.
position?: 'top' | 'left' | 'bottom' | 'right' | [number, number];
};
};
```
The style of the anchor shapes can be referred to as [CircleStyleProps](../shape/CircleStyleProps.en.md).
### ComboDisplayModelData.otherShapes
The xxShape(s) mentioned above are the predefined shapes in the G6 Combo specification. Other custom shapes in the Combo should be defined and configured in `otherShapes`.
- **Required**: False;
- **Type**:
```typescript
{
// The key is the shape id, in the format of xxShape
// The value is the shape style configuration (which varies depending on the shape, see the relevant documentation for each shape), as well as the animation of the shape
[shapeId: string]: ShapeStyleProps;
}
```
The style configurations for different shapes can be referred to in the corresponding documentation under the [Shape Style](../shape/BaseStyleProps.en.md) directory.

View File

@ -0,0 +1,238 @@
---
title: ComboDisplayModel 渲染数据
order: 12
---
ComboDisplayModelCombo 的渲染/展示数据) 由 ComboModel内部流转数据通过您配置在图实例上 mapper[specification.combo](../graph/Specification.zh.md#combo))映射后的结果,仅用于内部渲染时消费,您在其他任何地方不会消费它。数据类型继承自内部流转的 Combo 数据类型 [`ComboModel`](./ComboModel.zh.md),扩展后定义如下:
```typescript
interface ComboDisplayModel {
id: string | number;
data: ComboDisplayModelData; // 扩展了 ComboModelData
}
```
## id
Combo 的唯一 IDCombo 创建后ID 不可被修改。
- **是否必须**: 是;
- **类型**: `string|number`
## data
ComboDisplayModelData 中的数据已经是 ComboModel 通过 Graph 实例上配置的对应 mapper[specification.combo](../graph/Specification.zh.md#combo))映射后的结果,这里面应当存储所有 ComboModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`ComboDisplayModelData`](#combodisplaymodeldatalodlevels),基于 [`ComboModel`](./ComboModel.zh.md#combomodeldatatype) 额外扩展内容如下文:
### ComboDisplayModelData.lodLevels
对于该 Combo 而言,设定图缩放等级的划分方式。是一个缩放系数范围的数组,表示缩放等级的划分。其中有一项的 `primary` 应当为 `true`,代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。
- **是否必须**: 否;
- **类型**: `LodLevel`[],其中 `LodLevel` 如下表:
| Name | Type | Description |
| :---------- | :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `zoomRange` | `[number, number]` | 本层级所定义的图缩放等级范围,当图缩放等级 zoom >= zoomRange[0] && zoom < zoomRange[1] 表示在该层级下 |
| `primary` | `boolean` | 是否为主层级,若为 `true` 则代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。在 `ComboDisplayModelData.lodLevels` 中,应当只有一个层级为 `primary: true` |
### ComboDisplayModelData.animates
出现、消失、显示、隐藏、更新时,各个图形动画配置。支持一次更新,多个动画的顺序执行(`order`)。[动画 DEMO](/zh/examples/scatter/changePosition/#itemAnimates)。
- **是否必须**: 否;
- **类型**: `IAnimates`,定义如下:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // Combo 中某些图形创建时的动画
buildOut?: IAnimate[]; // Combo 中某些图形销毁时的动画
show?: IAnimate[]; // Combo 中某些图形从隐藏变为显示时的动画
hide?: IAnimate[]; // Combo 中某些图形从显示变为隐藏时的动画
update?: (IAnimate | IStateAnimate)[]; // Combo 中某些图形在相关数据或状态更新时的动画
}
```
其中,`IAnimate` 定义如下:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | 该动画相关的图形样式属性名称,例如 `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | 该动画需要在哪个图形上执行,此处指定该图形的 ID。不指定则代表整个图形分组上的动画 |
| `IAnimate.order?` | `number` | `0` | 该动画在 `IAnimate[]` 中执行的顺序,借此可实现一次更新多个动画的顺序播放 |
| `IAnimate.duration?` | `number` | `500` | 该动画执行一次所使用的时间,该值越小,则动画速度越快 |
| `IAnimate.iterations?` | `number` | `1` | 该动画执行的次数,-1 代表循环执行 |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | 该动画的缓动函数,可以设置的值可参考 [MDN easing 定义](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` 定义如下,即在 `IAnimate` 基础上增加了一个指定状态的字段 `states`,表示该动画在这些状态变更的时候执行:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### ComboDisplayModelData.keyShape
Combo 主图形的样式配置。Combo 的主图形表达了 Combo 的主要形状。还用于计算边的连入位置。
- **是否必须**: 否;
- **类型**: `ShapeStyle`,根据不同的主图形,图形样式配置项不同。例如 `'circle-combo'` 的主图形是 `'circle'` 参考 [Circle 图形样式](../shape/CircleStyleProps.zh.md)`'rect-combo'` 的主图形是 `'rect'` 参考 [Rect 图形样式](../shape/RectStyleProps.zh.md)。
### ComboDisplayModelData.haloShape
在内置的 Combo 和主题中,`haloShape` 指的是 Combo 在 `active`(一般在鼠标 hover 时该状态被触发) 和 `selected`(一般在选中状态下该状态被触发) 状态下,主图形 (`keyShape`) 周围展示的光晕效果的图形。在内置 Combo 的逻辑中,`haloShape` 的图形类型、颜色跟随主图形 (`keyShape`)。
- **是否必须**: 否;
- **类型**: `ShapeStyle``haloShape` 的图形类型跟随主图形(`keyShape`)。根据不同的主图形,图形样式配置项不同。例如 `'circle-combo'` 的主图形是 `'circle'` 参考 [Circle 图形样式](../shape/CircleStyleProps.zh.md)`'rect-combo'` 的主图形是 `'rect'` 参考 [Rect 图形样式](../shape/RectStyleProps.zh.md)。
### ComboDisplayModelData.labelShape
Combo 的文本图形,内置 Combo 或继承内置 Combo未复写相关内容的自定义 Combo 均支持。
- **是否必须**: 否;
- **类型**:
```typescript
TextStyleProps & {
/**
* 文本相对于 Combo 主图形 (keyShape) 的位置,可指定方位以及在 combo 的内部或外部
*/
position?: 'top' | 'bottom' | 'left' | 'right' | 'left-top' | 'ouside-top'| 'ouside-left' | 'ouside-right' | 'ouside-bottom';
/**
* 文本图形相对于主图形 (keyShape) 在 x 方向上的偏移量
*/
offsetX?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 y 方向上的偏移量
*/
offsetY?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 z 方向上的偏移量
*/
offsetZ?: number;
/**
* 允许文本的最大宽度,若指定为数字,则表示像素值,若指定为带有 '%' 的文本,代表相对于主图形 (keyShape) 包围盒大小的百分比。默认值为 '200%',表示文本图形的最大宽度不可以超过主图形宽度的两倍。若超过,则自动截断并在末尾增加省略号 '...'
*/
maxWidth?: string | number;
/**
* 文本旋转角度(弧度制)
*/
angle?: number;
};
```
其中,相关的图形样式参考 [`TextStyleProps` 文本图形样式](../shape/TextStyleProps.zh.md)。
### ComboDisplayModelData.labelBackgroundShape
Combo 的文本的背景图形,是一个矩形。若不设置则不显示。设置为 `{}` 将使用主题中默认的样式显示文本背景图形。
- **是否必须**: 否;
- **类型**:
```typescript
ShapeStyle & {
padding?: number | number[]; // 文本距离背景矩形四周的留白距离
};
```
其中,参考矩形样式类型 [`RectStyleProps`](../shape/RectStyleProps.zh.md)。
### ComboDisplayModelData.badgeShapes
Combo 四周的徽标,单个徽标包括了 Combo 和背景图形badgeShapes 配置的是多个徽标。
- **是否必须**: 否;
- **类型**:
```typescript
{
/**
* 徽标的背景颜色(对所有徽标生效,优先级低于下面单个徽标的 color 设置)
*/
color?: string;
/**
* 徽标背景颜色的色板,意味着下面各个徽标将自动取用该色板中的颜色。
* 优先级低于下面单个徽标的 color 设置
*/
palette?: string[];
/**
* 徽标上文本的颜色(对所有徽标生效,优先级低于下面单个徽标的 textColor 设置)
*/
textColor?: string;
/**
* 单个徽标的样式配置,由县局高于上面的配置
*/
[key: number]: ShapeStyle & {
/**
* 该徽标的位置,支持的取值见下文
*/
position?: IBadgePosition;
/**
* 该徽标的背景色
*/
color?: string;
/**
* 该徽标的文本色
*/
textColor?: string;
};
}
```
`BadgePosition` 取值如下:
| Value | Description |
| :-------------- | :------------------------- |
| `'rightTop'` | 右上角,推荐 |
| `'right'` | 右侧中间,推荐 |
| `'rightBottom'` | 右下角,推荐 |
| `'leftTop'` | 左上角 |
| `'left'` | 左侧中间 |
| `'leftBottom'` | 左下角 |
| `'bottom'` | 下方中间 |
| `'top'` | 上方中间 |
| `'bottomRight'` | 右下角,同 `'rightBottom'` |
| `'bottomLeft'` | 左下角,同 `'leftBottom'` |
| `'topRight'` | 右上角,同 `'rightTop'` |
| `'topLeft'` | 左上角,同 `'leftTop'` |
### ComboDisplayModelData.anchorShapes
Combo 四周的边连入位置圆形图形连接桩anchorShapess 配置的是多个连接桩。
- **是否必须**: 否;
- **类型**:
```typescript
// 外层可配置对所有连接桩(圆形)的样式,优先级低于单独的连接桩配置
CircleStyleProps & {
// 单独的连接桩图形配置,优先级高于外层的 CircleStyleProps
[key: number]: CircleStyleProps & {
// 该连接桩的位置,可配置字符串或数字数组表示相对于主图形 (keyShape) 包围盒的百分比位置,例如 [0.5, 1] 表示位于主图形的右侧中间
position?: 'top' | 'left' | 'bottom' | 'right' | [number, number];
};
};
```
其中,相关的图形样式参考 [`CircleStyleProps` 圆形图形样式](../shape/CircleStyleProps.zh.md)。
### ComboDisplayModelData.otherShapes
上面所有的 xxShape(s) 均为 G6 定义的规范 Combo 中可能存在的图形。自定义 Combo 中的其他图形应当定义和配置在 `otherShapes` 中。
- **是否必须**: 否;
- **类型**:
```typescript
{
// key 为图形 id规范格式为 xxShape
// value 为图形样式配置(不同图形配置不同,见图形相关文档),以及图形的动画
[shapeId: string]: ShapeStyleProps;
}
```
其中,不同的图形样式参考[图形样式](../shape/BaseStyleProps.zh.md)目录下对应的图形类型文档。

View File

@ -0,0 +1,77 @@
---
title: ComboModel
order: 8
---
ComboModel is the combo data that is internally circulated, which is calculated from `ComboUserModel` through transformations on the graph instance. The data you consume anywhere later is based on this data. Each item in Combo inherits from [`ComboUserModel`](./ComboUserModel.en.md) and is defined as follows after extension:
```typescript
interface ComboModel {
id: string | number;
data: ComboModelData; // = ComboModelData
}
```
## id
The unique ID of the combo. After the combo is created, the ID cannot be modified.
- **Required**: True;
- **Type**: `string|number`
## data
The data in InnerModelData has been generated from UserModelData through a series of transform functions on the graph instance. The business data may have been transformed, filtered, and merged.
- **Required**: True;
- **Type**: `ComboModelData`, the definition is the same as [`ComboUserModel`](./ComboUserModel.en.md#ComboModelDatatype), as follows:
### ComboModelData.type
The rendering type of the combo, which can be a combo type registered on the graph class. The built-in and default registered types are `'circle-combo'` and `'rect-combo'`. The default is `'circle-combo'`.
- **Required**: False;
- **Type**: `string`
### ComboModelData.visible
Whether the combo is displayed by default.
- **Required**: False;
- **Type**: `boolean`
### ComboModelData.color
The theme color of the key shape (`keyShape`) of the combo, with a value in hexadecimal string format. Provided for simple configuration. More style configurations should be configured in the Combo mapper of the graph instance, including keyShape and various graphic styles.
- **Required**: False;
- **Type**: `string`
### ComboModelData.label
The text content of the `labelShape` of the combo. Provided for simple configuration. More style configurations should be configured in the Combo mapper of the graph instance, including the `text` value of `labelShape` or other graphic styles.
- **Required**: False;
- **Type**: `string`
### ComboModelData.icon
The configuration of the icon on the combo. The built-in combo's icon is drawn after the text. Provided for simple configuration. More style configurations should be configured in the Combo mapper of the graph instance, including the graphic style of the iconShape.
- **Required**: False;
- **Type**:
```typescript
{
type: 'text' | 'icon',
img?: string, // Required when type is 'text'
text?: string, // Required when type is 'icon'
}
```
### ComboModelData.parentId
The ID of the parent combo to which the combo belongs. `undefined` means it is a root.
- **Required**: False;
- **Type**: `string | number`

View File

@ -0,0 +1,77 @@
---
title: ComboModel 内部数据
order: 8
---
ComboModel 为内部流转的 combo 数据,由 ComboUserModel 经过皮质在图实例上的 transforms 计算而得。后续您在任意地方消费的都是这一份数据。每一项 Combo 的类型继承自 [`ComboUserModel`](./ComboUserModel.zh.md),扩展后定义如下:
```typescript
interface ComboModel {
id: string | number;
data: ComboModelData; // = ComboModelData
}
```
## id
节点的唯一 ID节点创建后ID 不可被修改。
- **是否必须**: 是;
- **类型**: `string|number`
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: `ComboModelData`,同 [`ComboUserModel`](./ComboUserModel.zh.md#ComboModelDatatype) 定义如下:
### ComboModelData.type
Combo 的渲染类型,可以是已经注册到图类上的 Combo 类型,内置并默认注册的有 `'circle-combo'``'rect-combo'`。默认为 `'circle-combo'`
- **是否必须**:否;
- **类型** `string`
### ComboModelData.visible
Combo 是否默认展示出来。
- **是否必须**:否;
- **类型** `boolean`
### ComboModelData.color
该 Combo 的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 keyShape 以及各种图形的图形样式。
- **是否必须**:否;
- **类型** `string`
### ComboModelData.label
Combo `labelShape` 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 `labelShape``text` 值或其他图形样式。
- **是否必须**:否;
- **类型** `string`
### ComboModelData.icon
Combo 上的 icon 配置。内置 Combo 的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 iconShape 的图形样式。
- **是否必须**:否;
- **类型**
```typescript
{
type: 'text' | 'icon',
img?: string, // type 为 'text' 时需要提供
text?: string, // type 为 'icon' 时需要提供
}
```
### ComboModelData.parentId
在有 Combo 的图上表示该 Combo 所属的父亲 Combo 的 id。`undefined` 表示当前 Combo 是一个根。
- **是否必须**:否;
- **类型** `string | number`

View File

@ -14,48 +14,50 @@ interface ComboUserModel {
## id ## id
The unique ID of the combo. Once the combo is created, the ID cannot be changed.
- **Required**: True; - **Required**: True;
- **Type**: `string|number`; - **Type**: `string|number`;
The unique ID of the combo. Once the combo is created, the ID cannot be changed.
## data ## data
The data of the combo, excluding the ID. It is recommended to store business data. If data conversion is needed, it can be done through the transform function configured in the Graph instance, see [Specification.transforms](../graph/Specification.en.md#transforms). The converted data becomes the internal data that circulates within the graph. All subsequent accesses will be based on this internal data. For rendering-related data, it can be mapped using the combo mapper of the Graph instance, see [Specification.combo](../graph/Specification.en.md#combo). The input of this mapper is the internal data, and the generated display data is only consumed by the renderer. Users will not obtain it anywhere.
- **Required**: True; - **Required**: True;
- **Type**: [`ComboUserModelData`](#combousermodeldatatype); - **Type**: [`ComboUserModelData`](#combousermodeldatatype);
The data of the combo, excluding the ID. It is recommended to store business data. If data conversion is needed, it can be done through the transform function configured in the Graph instance, see [Specification.transforms](../graph/Specification.en.md#transforms). The converted data becomes the internal data that circulates within the graph. All subsequent accesses will be based on this internal data. For rendering-related data, it can be mapped using the combo mapper of the Graph instance, see [Specification.combo](../graph/Specification.en.md#combo). The input of this mapper is the internal data, and the generated display data is only consumed by the renderer. Users will not obtain it anywhere.
### ComboUserModelData.type ### ComboUserModelData.type
Type: string The rendering type of the Combo, which can be a Combo type that has been registered with the graph class. Built-in and default registered types include `'circle-combo'`, `'rect-combo'`.
- Required: False; - Required: False;
- Type: `string`; - Type: `string`;
Type: string The rendering type of the Combo, which can be a Combo type that has been registered with the graph class. Built-in and default registered types include `'circle-combo'`, `'rect-combo'`.
### ComboUserModelData.visible ### ComboUserModelData.visible
Whether the Combo is displayed by default.
- Required: False; - Required: False;
- Type: `boolean`; - Type: `boolean`;
Whether the Combo is displayed by default.
### ComboUserModelData.color ### ComboUserModelData.color
- Required: Fal se;
- Type: `string`;
The theme color of the main graphic (keyShape) of the Combo, represented as a hexadecimal string. This is provided for simple configuration convenience. More style configurations should be made in the Combo mapper of the Graph instance, where keyShape and various graphics styles can be configured. The theme color of the main graphic (keyShape) of the Combo, represented as a hexadecimal string. This is provided for simple configuration convenience. More style configurations should be made in the Combo mapper of the Graph instance, where keyShape and various graphics styles can be configured.
### ComboUserModelData.label
- Required: False; - Required: False;
- Type: `string`; - Type: `string`;
### ComboUserModelData.label
The text content of the Combo labelShape. This is provided for simple configuration convenience. More style configurations should be made in the Combo mapper of the Graph instance, where the text value or other graphic styles of the labelShape can be configured. The text content of the Combo labelShape. This is provided for simple configuration convenience. More style configurations should be made in the Combo mapper of the Graph instance, where the text value or other graphic styles of the labelShape can be configured.
- Required: False;
- Type: `string`;
### ComboUserModelData.icon ### ComboUserModelData.icon
The icon configuration on the Combo. Built-in Combo icons are drawn after the text. This is provided for simple configuration convenience. More style configurations should be made in the iconShape graphic style of the Combo mapper of the Graph instance.
- Required: False; - Required: False;
- Type: - Type:
@ -67,11 +69,9 @@ The text content of the Combo labelShape. This is provided for simple configurat
} }
``` ```
The icon configuration on the Combo. Built-in Combo icons are drawn after the text. This is provided for simple configuration convenience. More style configurations should be made in the iconShape graphic style of the Combo mapper of the Graph instance.
### ComboUserModelData.parentId ### ComboUserModelData.parentId
Represents the id of the parent Combo that the Combo belongs to on a graph with Combos.
- Required: False; - Required: False;
- Type: `string | number`; - Type: `string | number`;
Represents the id of the parent Combo that the Combo belongs to on a graph with Combos.

View File

@ -1,5 +1,5 @@
--- ---
title: ComboUserModel title: ComboUserModel 输入数据
order: 5 order: 5
--- ---
@ -14,48 +14,50 @@ interface ComboUserModel {
## id ## id
Combo 的唯一 IDCombo 创建后ID 不可被修改。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: `string|number` - **类型**: `string|number`
Combo 的唯一 IDCombo 创建后ID 不可被修改。
## data ## data
Combo 除 ID 以外的的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的 combo mapper 进行映射,见 [Specification.combo](../graph/Specification.zh.md#combo),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: [`ComboUserModelData`](#combousermodeldatatype),详细见下文 - **类型**: [`ComboUserModelData`](#combousermodeldatatype),详细见下文
Combo 除 ID 以外的的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的 combo mapper 进行映射,见 [Specification.combo](../graph/Specification.zh.md#combo),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
### ComboUserModelData.type ### ComboUserModelData.type
Combo 的渲染类型,可以是已经注册到图类上的 Combo 类型,内置并默认注册的有 `'circle-combo'``'rect-combo'`。
- **是否必须**`否` - **是否必须**`否`
- **类型** `string` - **类型** `string`
Combo 的渲染类型,可以是已经注册到图类上的 Combo 类型,内置并默认注册的有 `'circle-combo'``'rect-combo'`。
### ComboUserModelData.visible ### ComboUserModelData.visible
Combo 是否默认展示出来。
- **是否必须**`否` - **是否必须**`否`
- **类型** `boolean` - **类型** `boolean`
Combo 是否默认展示出来。
### ComboUserModelData.color ### ComboUserModelData.color
- **是否必须**`否`
- **类型** `string`
该 Combo 的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 keyShape 以及各种图形的图形样式。 该 Combo 的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 keyShape 以及各种图形的图形样式。
- **是否必须**`否`
- **类型** `string`
### ComboUserModelData.label ### ComboUserModelData.label
Combo labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 labelShape 的 text 值或其他图形样式。
- **是否必须**`否` - **是否必须**`否`
- **类型** `string` - **类型** `string`
Combo labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 labelShape 的 text 值或其他图形样式。
### ComboUserModelData.icon ### ComboUserModelData.icon
Combo 上的 icon 配置。内置 Combo 的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 iconShape 的图形样式。
- **是否必须**`否` - **是否必须**`否`
- **类型** - **类型**
@ -67,11 +69,9 @@ Combo labelShape 的文本内容。为方便简单配置而提供,更多的样
} }
``` ```
Combo 上的 icon 配置。内置 Combo 的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的 Combo mapper 中配置 iconShape 的图形样式。
### ComboUserModelData.parentId ### ComboUserModelData.parentId
在有 Combo 的图上表示该 Combo 所属的父亲 Combo 的 id。
- **是否必须**`否` - **是否必须**`否`
- **类型** `string | number` - **类型** `string | number`
在有 Combo 的图上表示该 Combo 所属的父亲 Combo 的 id。

View File

@ -0,0 +1,216 @@
---
title: EdgeDisplayModel
order: 11
---
EdgeDisplayModel (edge rendering/display data) is the result of mapping the EdgeModel (internal flow data) configured on the graph instance using the mapper ([specification.edge](../graph/Specification.en.md#edge)). It is only consumed internally for rendering and will not be consumed anywhere else. The data type inherits from the [`EdgeModel`](./EdgeModel.en.md) data type [`EdgeModel`](./EdgeModel.en.md) and is extended as follows:
```typescript
interface EdgeDisplayModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeDisplayModelData; // extends EdgeModelData
}
```
## id
The unique ID of the edge. Once the edge is created, the ID cannot be modified.
- **Required**: True;
- **Type**: `string|number`
## source
The ID of the source node of the edge. It should correspond to an item in `nodes`, otherwise the edge data will not be added to the graph.
- **Required**: True;
- **Type**: `string|number`
## target
The ID of the target node of the edge. It should correspond to an item in `nodes`, otherwise the edge data will not be added to the graph.
- **Required**: True;
- **Type**: `string|number`
## data
The data in EdgeDisplayModelData is the result of the EdgeModel being mapped through the mapper ([specification.edge](../graph/Specification.en.md#edge)) configured on the Graph instance. It should store all the contents of the EdgeModel, as well as many graphic style configurations.
- **Required**: True;
- **Type**: [`EdgeDisplayModelData`](#EdgeDisplayModelDatalodlevels)extended from [`EdgeModel`](./EdgeModel.en.md#edgemodeldatatype) with additional content as described below:
### EdgeDisplayModelData.lodLevels
Specifies how the graph zoom levels are divided for this edge. It is an array of zoom level ranges, representing the division of zoom levels. One of them should have `primary` set to `true`, indicating that the index of this level is 0. lodLevels with `zoomRange` smaller than the current zoom level should have decreasing indices, while those with `zoomRange` larger than the current zoom level should have increasing indices. The index corresponds to the value of `lod` in the graphic configuration below.
- **Required**: False;
- **Type**: `LodLevel`[], where `LodLevel` is as follows:
| Name | Type | Description |
| :---------- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `zoomRange` | `[number, number]` | The range of zoom levels defined for this level. When the graph zoom level zoom >= zoomRange[0] && zoom < zoomRange[1], it means it is at this level |
| `primary` | `boolean` | Whether it is the primary level. If `true`, it means the index of this level is 0. The indices of levels smaller than the current level decrease, while those larger than the current level increase. There should be only one level with `primary: true` in `EdgeDisplayModelData.lodLevels`. The index corresponds to the value of `lod` in the graphic configuration below |
### EdgeDisplayModelData.animates
Animations for the appearance, disappearance, display, hiding, and updating of various graphics in the edge. Supports sequential execution of multiple animations in one update (order). [Animation Demo](/en/examples/scatter/changePosition/#itemAnimates).
- **Required**: False;
- **Type**: `IAnimates`, defined as follows:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // Animation when certain graphics in the edge are created
buildOut?: IAnimate[]; // Animation when certain graphics in the edge are destroyed
show?: IAnimate[]; // Animation when certain graphics in the edge transition from hidden to visible
hide?: IAnimate[]; // Animation when certain graphics in the edge transition from visible to hidden
update?: (IAnimate | IStateAnimate)[]; // Animation when certain graphics in the edge are updated based on related data or states
}
```
Among them, `IAnimate` is defined as follows:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | The names of the graphic style properties related to this animation, for example, `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | The ID of the graphic on which this animation is to be performed. If not specified, it means the animation is performed on the entire graphic group |
| `IAnimate.order?` | `number` | `0` | The order in which this animation is executed among `IAnimate[]`, allowing for sequential playback of multiple animations during one update |
| `IAnimate.duration?` | `number` | `500` | The duration of this animation, the smaller the value, the faster the animation speed |
| `IAnimate.iterations?` | `number` | `1` | The number of times this animation is executed, -1 represents looping execution |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | The easing function of this animation, the possible values can be referred to [MDN easing definition](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` is defined as follows, which adds a field `states` specifying the states in which this animation is executed to `IAnimate`:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### EdgeDisplayModelData.keyShape
The style configuration of the key shape of the edge. The key shape of the edge is the overall path shape of the edge.
- **Required**: False;
- **Type**: `ShapeStyle`, the shape style configuration of the key shape depends on the different main shapes. For example, the key shape of `'line-edge'` is `'line'`, please refer to [Line shape style](../shape/LineStyleProps.en.md); the key shape of `'cubic-edge'` is `'path'`, please refer to [Path shape style](../shape/PathStyleProps.en.md).
### EdgeDisplayModelData.iconShape
The icon shape of the edge (built-in edge support, custom edges that inherit these built-in edges also support it without overriding the relevant content). It is located in front of the text. It can be an image or text, and text supports iconfont.
- **Required**: False;
- **Type**:
```typescript
Partial<
TextStyleProps &
ImageStyleProps &
ShapeStyle & {
offsetX?: number;
offsetY?: number;
lod?: number;
}
>;
```
Among them, the related graphics styles refer to [`TextStyleProps`text shape style](../shape/TextStyleProps.en.md) and [`ImageStyleProps` image shape style](../shape/ImageStyleProps.en.md).
### EdgeDisplayModelData.haloShape
In built-in edges and themes, `haloShape` refers to the halo effect displayed around the key shape (`keyShape`) of the edge in the `active` state (usually triggered when the mouse hovers over) and the `selected` state (usually triggered in the selected state). In the logic of built-in edges, the graphic type and color of `haloShape` follow the key shape (`keyShape`).
- **Required**: False;
- **Type**: `ShapeStyle`, the graphic type of haloShape follows the key shape (`keyShape`). The shape style configuration is different for different main shapes. For example, the key shape of `'line-edge'` is `'line'`, please refer to [Line shape style](../shape/LineStyleProps.en.md); the key shape of `'cubic-edge'` is `'path'`, please refer to [Path shape style](../shape/PathStyleProps.en.md).
### EdgeDisplayModelData.labelShape
The text shape of the edge, both built-in edges and custom edges that inherit the built-in edges (without overriding the relevant content) support it.
- **Required**: False;
- **Type**:
```typescript
TextStyleProps & {
/**
* The position of the text relative to the key shape (keyShape) of the edge, which supports the start, middle, and end of the edge
*/
position?: 'start' | 'middle' | 'end';
/**
* The offset of the text shape relative to the key shape (keyShape) of the edge in the x direction
*/
offsetX?: number;
/**
* The offset of the text shape relative to the key shape (keyShape) of the edge in the y direction
*/
offsetY?: number;
/**
* The offset of the text shape relative to the key shape (keyShape) of the edge in the z direction
*/
offsetZ?: number;
/**
* The maximum width allowed for the text, if specified as a number, it represents the pixel value, if specified as text with '%', it represents the percentage of the size of the key shape (keyShape). The default value is '60%', which means that the maximum width of the text shape cannot exceed twice the width of the key shape. If it exceeds, it will be automatically truncated and an ellipsis '...' will be added at the end.
*/
maxWidth?: string | number;
/**
* Whether the text rotates with the edge
*/
autoRotate?: boolean;
};
```
Among them, the related graphic styles refer to [TextStyleProps text shape style](../shape/TextStyleProps.en.md).
### EdgeDisplayModelData.labelBackgroundShape
The background shape of the text of the edge, which is a rectangle. If not set, it will not be displayed. Setting it to `{}` will use the default style in the theme to display the background shape of the text.
- **Required**: False;
- **Type**:
```typescript
ShapeStyle & {
padding?: number | number[]; // The padding distance between the text and the background rectangle
};
```
Among them, please refer to the rectangle style type [`RectStyleProps`](../shape/RectStyleProps.en.md).
### EdgeDisplayModelData.
The badge of the edge, including text and background shape. Unlike nodes that support multiple badges, the built-in edge only supports one badge, which is located behind the text.
- **Required**: False;
- **Type**:
```typescript
ShapeStyleProps & {
/**
* The background color of the badge
*/
color?: string;
/**
* The color of the text on the badge
*/
textColor?: string;
}
```
### EdgeDisplayModelData.otherShapes
上面所有的 xxShape(s) 均为 G6 All the xxShape(s) mentioned above are possible graphics in the standard edge defined by G6. Other graphics in custom edges should be defined and configured in `otherShapes`.
- **Required**: False;
- **Type**:
```typescript
{
// The key is the graphic id, the format specified by the specification is xxShape
// The value is the graphic style configuration (different graphics have different configurations, see the relevant graphics documentation) and the animation of the graphic
[shapeId: string]: ShapeStyleProps;
}
```
Among them, different graphic styles refer to the corresponding graphic type documents under the [Shape Style](../shape/BaseStyleProps.en.md) directory.

View File

@ -0,0 +1,216 @@
---
title: EdgeDisplayModel 渲染数据
order: 11
---
EdgeDisplayModel边的渲染/展示数据) 由 EdgeModel内部流转数据通过您配置在图实例上 mapper[specification.edge](../graph/Specification.zh.md#edge))映射后的结果,仅用于内部渲染时消费,您在其他任何地方不会消费它。数据类型继承自内部流转的边数据类型 [`EdgeModel`](./EdgeModel.zh.md),扩展后定义如下:
```typescript
interface EdgeDisplayModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeDisplayModelData; // 扩展了 EdgeModelData
}
```
## id
边的唯一 ID边创建后ID 不可被修改。
- **是否必须**: 是;
- **类型**: `string|number`
## source
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
- **是否必须**: 是;
- **类型**: `string|number`
## target
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
- **是否必须**: 是;
- **类型**: `string|number`
## data
EdgeDisplayModelData 中的数据已经是 EdgeModel 通过 Graph 实例上配置的对应 mapper[specification.edge](../graph/Specification.zh.md#edge))映射后的结果,这里面应当存储所有 EdgeModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`EdgeDisplayModelData`](#EdgeDisplayModelDatalodlevels),基于 [`EdgeModel`](./EdgeModel.zh.md#edgemodeldatatype) 额外扩展内容如下文:
### EdgeDisplayModelData.lodLevels
对于该边而言,设定图缩放等级的划分方式。是一个缩放系数范围的数组,表示缩放等级的划分。其中有一项的 `primary` 应当为 `true`,代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。
- **是否必须**: 否;
- **类型**: `LodLevel`[],其中 `LodLevel` 如下表:
| Name | Type | Description |
| :---------- | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `zoomRange` | `[number, number]` | 本层级所定义的图缩放等级范围,当图缩放等级 zoom >= zoomRange[0] && zoom < zoomRange[1] 表示在该层级下 |
| `primary` | `boolean` | 是否为主层级,若为 `true` 则代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。在 `EdgeDisplayModelData.lodLevels` 中,应当只有一个层级为 `primary: true` |
### EdgeDisplayModelData.animates
出现、消失、显示、隐藏、更新时,各个图形动画配置。支持一次更新,多个动画的顺序执行(`order`)。[动画 DEMO](/zh/examples/scatter/changePosition/#itemAnimates)。
- **是否必须**: 否;
- **类型**: `IAnimates`,定义如下:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // 边中某些图形创建时的动画
buildOut?: IAnimate[]; // 边中某些图形销毁时的动画
show?: IAnimate[]; // 边中某些图形从隐藏变为显示时的动画
hide?: IAnimate[]; // 边中某些图形从显示变为隐藏时的动画
update?: (IAnimate | IStateAnimate)[]; // 边中某些图形在相关数据或状态更新时的动画
}
```
其中,`IAnimate` 定义如下:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | 该动画相关的图形样式属性名称,例如 `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | 该动画需要在哪个图形上执行,此处指定该图形的 ID。不指定则代表整个图形分组上的动画 |
| `IAnimate.order?` | `number` | `0` | 该动画在 `IAnimate[]` 中执行的顺序,借此可实现一次更新多个动画的顺序播放 |
| `IAnimate.duration?` | `number` | `500` | 该动画执行一次所使用的时间,该值越小,则动画速度越快 |
| `IAnimate.iterations?` | `number` | `1` | 该动画执行的次数,-1 代表循环执行 |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | 该动画的缓动函数,可以设置的值可参考 [MDN easing 定义](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` 定义如下,即在 `IAnimate` 基础上增加了一个指定状态的字段 `states`,表示该动画在这些状态变更的时候执行:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### EdgeDisplayModelData.keyShape
边主图形的样式配置。边的主图形是边的整体路径图形。
- **是否必须**: 否;
- **类型**: `ShapeStyle`,根据不同的主图形,图形样式配置项不同。例如 `'line-edge'` 的主图形是 `'line'` 参考 [Line 图形样式](../shape/LineStyleProps.zh.md)`'cubic-edge'` 的主图形是 `'path'` 参考 [Path 图形样式](../shape/PathStyleProps.zh.md)。
### EdgeDisplayModelData.iconShape
边的图标图形(内置边支持,继承这些内置边的自定义边在无复写相关内容的情况下同样支持),位于文本前方。可以是图片或文本,文本支持 iconfont。
- **是否必须**: 否;
- **类型**:
```typescript
Partial<
TextStyleProps &
ImageStyleProps &
ShapeStyle & {
offsetX?: number;
offsetY?: number;
lod?: number;
}
>;
```
其中,相关的图形样式参考 [`TextStyleProps` 文本图形样式](../shape/TextStyleProps.zh.md),和 [`ImageStyleProps` 图片图形样式](../shape/ImageStyleProps.zh.md)。
### EdgeDisplayModelData.haloShape
在内置的边和主题中,`haloShape` 指的是边在 `active`(一般在鼠标 hover 时该状态被触发) 和 `selected`(一般在选中状态下该状态被触发) 状态下,主图形 (`keyShape`) 周围展示的光晕效果的图形。在内置边的逻辑中,`haloShape` 的图形类型、颜色跟随主图形 (`keyShape`)。
- **是否必须**: 否;
- **类型**: `ShapeStyle``haloShape` 的图形类型跟随主图形(`keyShape`)。根据不同的主图形,图形样式配置项不同。例如 `'line-edge'` 的主图形是 `'line'` 参考 [Line 图形样式](../shape/LineStyleProps.zh.md)`'cubic-edge'` 的主图形是 `'path'` 参考 [Path 图形样式](../shape/PathStyleProps.zh.md)。
### EdgeDisplayModelData.labelShape
边的文本图形,内置边或继承内置边(未复写相关内容)的自定义边均支持。
- **是否必须**: 否;
- **类型**:
```typescript
TextStyleProps & {
/**
* 文本相对于边主图形 (keyShape) 的位置,支持在边的起始处、中央、结束处
*/
position?: 'start' | 'middle' | 'end';
/**
* 文本图形相对于主图形 (keyShape) 在 x 方向上的偏移量
*/
offsetX?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 y 方向上的偏移量
*/
offsetY?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 z 方向上的偏移量
*/
offsetZ?: number;
/**
* 允许文本的最大宽度,若指定为数字,则表示像素值,若指定为带有 '%' 的文本,代表相对于主图形 (keyShape) 包围盒大小的百分比。默认值为 '60%',表示文本图形的最大宽度不可以超过主图形宽度的两倍。若超过,则自动截断并在末尾增加省略号 '...'
*/
maxWidth?: string | number;
/**
* 文本是否跟随边旋转
*/
autoRotate?: boolean;
};
```
其中,相关的图形样式参考 [`TextStyleProps` 文本图形样式](../shape/TextStyleProps.zh.md)。
### EdgeDisplayModelData.labelBackgroundShape
边的文本的背景图形,是一个矩形。若不设置则不显示。设置为 `{}` 将使用主题中默认的样式显示文本背景图形。
- **是否必须**: 否;
- **类型**:
```typescript
ShapeStyle & {
padding?: number | number[]; // 文本距离背景矩形四周的留白距离
};
```
其中,参考矩形样式类型 [`RectStyleProps`](../shape/RectStyleProps.zh.md)。
### EdgeDisplayModelData.
边的徽标,包括了文本和背景图形。和节点支持多个徽标不同,内置边仅支持一个徽标,位于文本后方。
- **是否必须**: 否;
- **类型**:
```typescript
ShapeStyleProps & {
/**
* 徽标的背景颜色
*/
color?: string;
/**
* 徽标上文本的颜色
*/
textColor?: string;
}
```
### EdgeDisplayModelData.otherShapes
上面所有的 xxShape(s) 均为 G6 定义的规范边中可能存在的图形。自定义边中的其他图形应当定义和配置在 `otherShapes` 中。
- **是否必须**: 否;
- **类型**:
```typescript
{
// key 为图形 id规范格式为 xxShape
// value 为图形样式配置(不同图形配置不同,见图形相关文档),以及图形的动画
[shapeId: string]: ShapeStyleProps;
}
```
其中,不同的图形样式参考[图形样式](../shape/BaseStyleProps.zh.md)目录下对应的图形类型文档。

View File

@ -0,0 +1,116 @@
---
title: EdgeModel
order: 8
---
EdgeModel represents the edge data that is internally passed through the `EdgeUserModel` and transformed on the graph instance. You consume this data anywhere afterwards. Each edge item extends from [`EdgeUserModel`](./EdgeUserModel.zh.md) and is defined as follows after expansion:
```typescript
interface EdgeModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeModelData; // = EdgeModelData
}
```
## id
The unique ID of the edge. Once the node is created, the ID cannot be modified.
- **Required**: True;
- **Type**: `string|number`
## source
The ID of the source node of the edge, which should correspond to an item in `nodes`. Otherwise, the edge data will not be added to the graph.
- **Required**: True;
- **Type**: `string|number`
## target
The ID of the target node of the edge, which should correspond to an item in nodes. Otherwise, the edge data will not be added to the graph.
- **Required**: True;
- **Type**: `string|number`
## data
The data in InnerModelData is the result of UserModelData transformed through a series of transform functions on the Graph instance. The business data may have been converted, filtered, and merged.
- **Required**: True;
- **Type**: `EdgeModelData`, same as [`EdgeModelData`](./EdgeUserModel.zh.md#EdgeModelDatatype) as follows:
### EdgeModelData.type
The rendering type of the edge, which can be a registered edge type on the graph, with the built-in and default registered types being `'line-edge'` and `'loop-edge'`. The default value is `'line-edge'`.
- **Required**: False;
- **Type**: `string`;
### EdgeModelData.visible
Whether the edge is displayed by default.
- **Required**: False;
- **Type**: `boolean`;
### EdgeModelData.color
The theme color of the main shape (keyShape) of the edge, with a value in hexadecimal string format. This is provided for convenient simple configuration, and more style configurations should be configured in the edge mapper of the Graph instance for the keyShape and various shape styles.
- **Required**: False;
- **Type**: `string`;
### EdgeModelData.label
The text content of the `labelShape` of the edge. This is provided for convenient simple configuration, and more style configurations should be configured in the edge mapper of the Graph instance for the text value or other shape styles of the `labelShape`.
- **Required**: False;
- **Type**: `string`;
### EdgeModelData.badge
The configuration of the badge on the edge, with the built-in badge being drawn after the text. More style configurations should be configured in the edge mapper of the Graph instance for the shape styles of the `badgeShapes`.
- **Required**: False;
- **Type**:
```typescript
{
position: BadgePosition,
type: 'text' | 'icon',
img?: string, // required when type is 'text'
text?: string, // required when type is 'icon'
};
```
### EdgeModelData.icon
The configuration of the icon on the edge. The built-in edge icon is drawn after the text. This is provided for convenient simple configuration, and more style configurations should be configured in the edge mapper of the Graph instance for the shape styles of the iconShape.
- **Required**: False;
- **Type**:
```typescript
{
type: 'text' | 'icon',
img?: string, // required when type is 'text'
text?: string, // required when type is 'icon'
}
```
### EdgeModelData.sourceAnchor
The `anchorPoints` on the source node indicate the allowed positions where related edges can connect, and is an array. The `sourceAnchor` of the edge indicates which anchor point to connect to when the edge connects to the starting point, corresponding to the index of the corresponding position in the `anchorPoints` of the source node.
- **Required**: False;
- **Type**: `number`;
### EdgeModelData.targetAnchor
The `anchorPoints` on the target node indicate the allowed positions where related edges can connect, and is an array. The `targetAnchor` of the edge indicates which anchor point to connect to when the edge connects to the ending point, corresponding to the index of the corresponding position in the `anchorPoints` of the target node.
- **Required**: False;
- **Type**: `number`;

View File

@ -0,0 +1,116 @@
---
title: EdgeModel 内部数据
order: 8
---
EdgeModel 为内部流转的边数据,由 EdgeUserModel 经过皮质在图实例上的 transforms 计算而得。后续您在任意地方消费的都是这一份数据。每一项边的类型继承自 [`EdgeUserModel`](./EdgeUserModel.zh.md),扩展后定义如下:
```typescript
interface EdgeModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeModelData; // = EdgeModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
边的唯一 ID节点创建后ID 不可被修改。
## source
- **是否必须**: 是;
- **类型**: `string|number`
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## target
- **是否必须**: 是;
- **类型**: `string|number`
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: `EdgeModelData`,同 [`EdgeModelData`](./EdgeUserModel.zh.md#EdgeModelDatatype) 定义如下:
### EdgeModelData.type
- **是否必须**: 否;
- **类型**: `string`
边的渲染类型,可以是已经注册到图类上的边类型,内置并默认注册的有 `'line-edge'``'loop-edge'`。默认为 `'line-edge'`
### EdgeModelData.visible
- **是否必须**: 否;
- **类型**: `boolean`
边是否默认展示出来。
### EdgeModelData.color
- **是否必须**: 否;
- **类型**: `string`
该边的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的边 mapper 中配置 keyShape 以及各种图形的图形样式。
### EdgeModelData.label
- **是否必须**: 否;
- **类型**: `string`
边 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 labelShape 的 text 值或其他图形样式。
### EdgeModelData.badge
- **是否必须**: 否;
- **类型**:
```typescript
{
position: BadgePosition,
type: 'text' | 'icon',
img?: string, // type 为 'text' 时需要提供
text?: string, // type 为 'icon' 时需要提供
};
```
边上的徽标配置,内置边的徽标绘制在文本后方。更多的样式配置应当在 Graph 实例的边 mapper 中配置 badgeShapes 的图形样式。
### EdgeModelData.icon
- **是否必须**: 否;
- **类型**:
```typescript
{
type: 'text' | 'icon',
img?: string, // type 为 'text' 时需要提供
text?: string, // type 为 'icon' 时需要提供
}
```
边上的 icon 配置。内置边的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 iconShape 的图形样式。
### EdgeModelData.sourceAnchor
- **是否必须**: 否;
- **类型**: `number`
起点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `sourceAnchor` 表示了这条边连入起点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。
### EdgeModelData.targetAnchor
- **是否必须**: 否;
- **类型**: `number`
终点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `targetAnchor` 表示了这条边连入终点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。

View File

@ -1,5 +1,5 @@
--- ---
title: EdgeUserModel title: EdgeUserModel 输入数据
order: 4 order: 4
--- ---
@ -16,62 +16,64 @@ interface EdgeUserModel {
## id ## id
边的唯一 ID节点创建后ID 不可被修改。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: `string|number` - **类型**: `string|number`
边的唯一 ID节点创建后ID 不可被修改。
## source ## source
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: `string|number` - **类型**: `string|number`
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## target ## target
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: `string|number` - **类型**: `string|number`
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## data ## data
边除 ID、起点 ID、终点 ID 以外的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的边 mapper 进行映射,见 [Specification.edge](../graph/Specification.zh.md#edge),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: [`EdgeUserModelData`](#edgeusermodeldatatype) - **类型**: [`EdgeUserModelData`](#edgeusermodeldatatype)
边除 ID、起点 ID、终点 ID 以外的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的边 mapper 进行映射,见 [Specification.edge](../graph/Specification.zh.md#edge),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
### EdgeUserModelData.type ### EdgeUserModelData.type
边的渲染类型,可以是已经注册到图类上的边类型,内置并默认注册的有 `'line-edge'``'loop-edge'`。
- 是否必须:否; - 是否必须:否;
- 类型: `string` - 类型: `string`
边的渲染类型,可以是已经注册到图类上的边类型,内置并默认注册的有 `'line-edge'``'loop-edge'`。
### EdgeUserModelData.visible ### EdgeUserModelData.visible
边是否默认展示出来。
- 是否必须:否; - 是否必须:否;
- 类型: `boolean` - 类型: `boolean`
边是否默认展示出来。
### EdgeUserModelData.color ### EdgeUserModelData.color
- 是否必须:否;
- 类型: `string`
该边的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的边 mapper 中配置 keyShape 以及各种图形的图形样式。 该边的主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的边 mapper 中配置 keyShape 以及各种图形的图形样式。
- 是否必须:否;
- 类型: `string`
### EdgeUserModelData.label ### EdgeUserModelData.label
边 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 labelShape 的 text 值或其他图形样式。
- 是否必须:否; - 是否必须:否;
- 类型: `string` - 类型: `string`
边 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 labelShape 的 text 值或其他图形样式。
### EdgeUserModelData.badge ### EdgeUserModelData.badge
边上的徽标配置,内置边的徽标绘制在文本后方。更多的样式配置应当在 Graph 实例的边 mapper 中配置 badgeShapes 的图形样式。
- 是否必须:否; - 是否必须:否;
- 类型: - 类型:
@ -84,10 +86,10 @@ interface EdgeUserModel {
}; };
``` ```
边上的徽标配置,内置边的徽标绘制在文本后方。更多的样式配置应当在 Graph 实例的边 mapper 中配置 badgeShapes 的图形样式。
### EdgeUserModelData.icon ### EdgeUserModelData.icon
边上的 icon 配置。内置边的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 iconShape 的图形样式。
- 是否必须:否; - 是否必须:否;
- 类型: - 类型:
@ -99,18 +101,16 @@ interface EdgeUserModel {
} }
``` ```
边上的 icon 配置。内置边的 icon 绘制在文本后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的边 mapper 中配置 iconShape 的图形样式。
### EdgeUserModelData.sourceAnchor ### EdgeUserModelData.sourceAnchor
- 是否必须:否;
- 类型: `number`
起点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `sourceAnchor` 表示了这条边连入起点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。 起点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `sourceAnchor` 表示了这条边连入起点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。
### EdgeUserModelData.targetAnchor
- 是否必须:否; - 是否必须:否;
- 类型: `number` - 类型: `number`
### EdgeUserModelData.targetAnchor
终点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `targetAnchor` 表示了这条边连入终点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。 终点节点上 `anchorPoints` 表示允许相关边连入的位置,是一个数组。而边的 `targetAnchor` 表示了这条边连入终点时选择哪个锚点连入,对应了起点节点上 `anchorPoints` 对应位置的序号。
- 是否必须:否;
- 类型: `number`

View File

@ -0,0 +1,274 @@
---
title: NodeDisplayModel
order: 10
---
NodeDisplayModel (Node rendering/display data) is the result of mapping the NodeModel (internal data) through the mapper you configured on the graph instance ([specification.node](../graph/Specification.en.md#node)). It is only consumed internally for rendering purposes and will not be consumed anywhere else. The data type inherits from the internal node data type [`NodeModel`](./NodeModel.en.md) and is defined as follows after extension:
```typescript
interface NodeDisplayModel {
id: string | number;
data: NodeDisplayModelData; // extends NodeModelData
}
```
## id
- **Required**: True;
- **Type**: `string|number`
The unique ID of the node. Once the node is created, the ID cannot be modified.
## data
The data in NodeDisplayModelData is the result of mapping NodeModel through the mapper configured on the graph instance ([specification.node](../graph/Specification.en.md#node)). It should store all the contents of NodeModel, along with additional graphical style configurations.
- **Required**: True;
- **Type**: [`NodeDisplayModelData`](#nodedisplaymodeldatalodlevels), which extends [`NodeModel`](./NodeModel.en.md#nodemodeldatatype) with additional content as described below:
```typescript
type NodeModelData = NodeModelData & NodeShapeStyles & { lodLevels?: LodLevel[] };
```
### NodeDisplayModelData.lodLevels
Specifies how the graph is divided into zoom levels for this node. It is an array of zoom level ranges, where each range is represented by a `zoomRange` range. One of the ranges should have `primary: true`, indicating that its level number is 0. Levels with smaller `zoomRange` values have decreasing level numbers, while levels with larger `zoomRange` values have increasing level numbers. The level number corresponds to the lod value in the shape configuration below.
- **Required**: False;
- **Type**: `LodLevel`[]where `LodLevel` has the following properties:
| Name | Type | Description |
| :---------- | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `zoomRange` | `[number, number]` | The zoom level range defined for this level. When the graph zoom level zoom >= zoomRange[0] && zoom < zoomRange[1], it indicates that the node is in this level |
| `primary` | `boolean` | Whether it is the primary level. If `true`, it means that the level number is 0. Levels with smaller this `zoomRange` values have decreasing level numbers, while levels with larger this `zoomRange` values have increasing level numbers. In the `NodeDisplayModelData.lodLevels` array, there should be only one level with `primary: true`. And the level number corresponds to the `lod` value in the shape style configurations below |
### NodeDisplayModelData.animates
Configuration of graphic animations when the node appears, disappears, shows, hides, or updates. Supports sequential execution of multiple animations (order). [Animation Demo](/en/examples/scatter/changePosition/#itemAnimates).
- **Required**: False;
- **Type**: `IAnimates`, defined as follows:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // Animations when certain graphics are created in the node
buildOut?: IAnimate[]; // Animations when certain graphics are destroyed in the node
show?: IAnimate[]; // Animations when certain graphics transition from hidden to visible in the node
hide?: IAnimate[]; // Animations when certain graphics transition from visible to hidden in the node
update?: (IAnimate | IStateAnimate)[]; // Animations when certain graphics undergo data or state updates in the node
}
```
In this, `IAnimate` is defined as follows:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | The names of the graphic style properties related to this animation, for example `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | The ID of the graphic on which the animation needs to be performed. If not specified, it represents the animation on the entire graphic group |
| `IAnimate.order?` | `number` | `0` | The order in which this animation is executed among `IAnimate[]`, allowing for sequential playback of multiple animations during one update |
| `IAnimate.duration?` | `number` | `500` | The duration of this animation, the smaller the value, the faster the animation speed |
| `IAnimate.iterations?` | `number` | `1` | The number of times this animation is executed, -1 represents looping execution |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | The easing function of this animation, the possible values can be referred to [MDN easing definition](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` is defined as follows, which adds a field `states` specifying the states in which this animation is executed to `IAnimate`:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### NodeDisplayModelData.keyShape
Configuration of the main graphic style of the node. The main graphic of a node represents the primary shape of the node and is also used to calculate the position where edges connect.
- **Required**: False;
- **Type**: `ShapeStyle`, which varies depending on the main graphic. For example, the main graphic of `'circle-node'` is `'circle'`, refer to [Circle Graphic Style](../shape/CircleStyleProps.en.md); the main graphic of `'image-node'` is `'image'`, refer to [Image Graphic Style](../shape/ImageStyleProps.en.md).
### NodeDisplayModelData.iconShape
The icon graphic at the center of the node (except for the built-in node type `'modelRect-node'`, which is supported by other built-in nodes and custom nodes that inherit from them without overriding the relevant content). It can be an image or text, with text supporting iconfont (assign `fontFamily: 'iconfont'`).
- **Required**: False;
- **Type**:
```typescript
Partial<
TextStyleProps &
ImageStyleProps &
ShapeStyle & {
offsetX?: number;
offsetY?: number;
lod?: number;
}
>;
```
Where the relevant graphic styles refer to [`TextStyleProps` Text Shape Style](../shape/TextStyleProps.en.md) and [`ImageStyleProps` Image Shape Style](../shape/ImageStyleProps.en.md).
### NodeDisplayModelData.haloShape
In built-in nodes and themes, `haloShape` refers to the halo effect graphic displayed around the main graphic (keyShape) of a node when it is in the `active` state (usually triggered when the mouse hovers) or `selected` state (usually triggered when it is selected). In the logic of built-in nodes, the graphic type and color of `haloShape` follow the main graphic (`keyShape`).
- **Required**: False;
- **Type**: `ShapeStyle`, the graphic type of `haloShape` follows the main graphic (`keyShape`). The graphic style configuration varies depending on the main graphic. For example, the main graphic of `'circle-node'` is `'circle'`, refer to [Circle Shape Style](../shape/CircleStyleProps.en.md); the main graphic of `'image-node'` is `'image'`, refer to [Image Shape Style](../shape/ImageStyleProps.en.md).
### NodeDisplayModelData.labelShape
The text shape of the node, both built-in nodes and custom nodes that inherit from built-in nodes (without overriding related content) are supported.
- **Required**: False;
- **Type**:
```typescript
TextStyleProps & {
/**
* The position of the text relative to the key shape (keyShape) of the node, supports above, below, left, right, and center
*/
position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
/**
* The x offset of the text shape relative to the key shape (keyShape)
*/
offsetX?: number;
/**
* The y offset of the text shape relative to the key shape (keyShape)
*/
offsetY?: number;
/**
* The z offset of the text shape relative to the key shape (keyShape)
*/
offsetZ?: number;
/**
* The maximum width allowed for the text.
* If specified as a number, it represents the pixel value.
* If specified as a text with '%', it represents a percentage of the key shape (keyShape) bounding box size.
* The default value is '200%', which means the maximum width of the text shape cannot exceed twice the width of the key shape.
* If it exceeds, it will be automatically truncated and an ellipsis '...' will be added at the end.
*/
maxWidth?: string | number;
/**
* The rotation angle of the text (in radians)
*/
angle?: number;
};
```
The related shape style can be referred to in [TextStyleProps](../shape/TextStyleProps.en.md).
### NodeDisplayModelData.labelBackgroundShape
The background shape of the text of the node, which is a rectangle. If not set, it will not be displayed. Setting it to `{}` will use the default style in the theme to display the background shape of the text.
- **Required**: False;
- **Type**:
```typescript
ShapeStyle & {
padding?: number | number[]; // The padding distance between the text and the background rectangle
};
```
The related rectangle style type can be referred to in [`RectStyleProps`](../shape/RectStyleProps.en.md).
### NodeDisplayModelData.badgeShapes
The badges around the node. A single badge includes text and background shape. The badgeShapes configuration is for multiple badges. [Node Badge Example](/en/examples/item/defaultNodes/#circle).
- **Required**: False;
- **Type**:
```typescript
{
/**
* The background color of the badge
* (works for all badges, lower priority than the color setting of individual badges)
*/
color?: string;
/**
* 徽标背景颜色的色板,意味着下面各个徽标将自动取用该色板中的颜色。
* 优先级低于下面单个徽标的 color 设置
*/
palette?: string[];
/**
* The color palette for the badge background color,
* which means the individual badges below will automatically use the colors in the palette.
* Lower priority than the color setting of individual badges
*/
textColor?: string;
/**
* The text color of the badge (works for all badges,
* lower priority than the textColor setting of individual badges)
*/
[key: number]: ShapeStyle & {
/**
* The position of this badge, supporting the values below
*/
position?: IBadgePosition;
/**
* The background color of this badge
*/
color?: string;
/**
* The text color of this badge
*/
textColor?: string;
};
}
```
The `BadgePosition` values are as follows:
| Value | Description |
| :-------------- | :------------------------------------------- |
| `'rightTop'` | Top right corner, recommended |
| `'right'` | Middle right, recommended |
| `'rightBottom'` | Bottom right corner, recommended |
| `'leftTop'` | Top left corner |
| `'left'` | Middle left |
| `'leftBottom'` | Bottom left corner |
| `'bottom'` | Middle bottom |
| `'top'` | Middle top |
| `'bottomRight'` | Bottom right corner, same as `'rightBottom'` |
| `'bottomLeft'` | Bottom left corner, same as `'leftBottom'` |
| `'topRight'` | Top right corner, same as `'rightTop'` |
| `'topLeft'` | Top left corner, same as `'leftTop'` |
### NodeDisplayModelData.anchorShapes
The circular shapes (anchor shapes) of the edges entering each side of the node. The anchorShapes configuration is for multiple anchor shapes. [Node Anchor Example](/en/examples/item/defaultNodes/#circle).
- **Required**: False;
- **Type**:
```typescript
// The outer circleStyleProps can be used to configure the style of all anchor shapes (circles),
// with lower priority than the individual anchor shape configuration
CircleStyleProps & {
// Individual anchor shape configuration,
// with higher priority than the outer circleStyleProps
[key: number]: CircleStyleProps & {
// The position of this anchor shape, can be configured as a string or number array representing the percentage position relative to the key shape (keyShape) bounding box,
// for example, [0.5, 1] means it is located in the middle right of the key shape
position?: 'top' | 'left' | 'bottom' | 'right' | [number, number];
};
};
```
The related circle style can be referred to in [`CircleStyleProps`](../shape/CircleStyleProps.en.md).
### NodeDisplayModelData.otherShapes
All the xxShape(s) above are the possible shapes that exist in the G6 defined standard node. Other shapes in custom nodes should be defined and configured in `otherShapes`.
- **Required**: False;
- **Type**:
```typescript
{
// key is the shape id, in the format of xxShape specified by the specification
// value is the shape style configuration (different shapes have different configurations, see the relevant shape documents), and the animation of the shape
[shapeId: string]: ShapeStyleProps;
}
```
The different shape styles can be referred to in the corresponding shape type documentation under the [Shape Style](../shape/BaseStyleProps.en.md) directory.

View File

@ -0,0 +1,263 @@
---
title: NodeDisplayModel 渲染数据
order: 10
---
NodeDisplayModel节点的渲染/展示数据) 由 NodeModel内部流转数据通过您配置在图实例上 mapper[specification.node](../graph/Specification.zh.md#node))映射后的结果,仅用于内部渲染时消费,您在其他任何地方不会消费它。数据类型继承自内部流转的节点数据类型 [`NodeModel`](./NodeModel.zh.md),扩展后定义如下:
```typescript
interface NodeDisplayModel {
id: string | number;
data: NodeDisplayModelData; // 扩展了 NodeModelData
}
```
## id
节点的唯一 ID节点创建后ID 不可被修改。
- **是否必须**: 是;
- **类型**: `string|number`
## data
NodeDisplayModelData 中的数据已经是 NodeModel 通过 Graph 实例上配置的对应 mapper[specification.node](../graph/Specification.zh.md#node))映射后的结果,这里面应当存储所有 NodeModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`NodeDisplayModelData`](#nodedisplaymodeldatalodlevels),基于 [`NodeModel`](./NodeModel.zh.md#nodemodeldatatype) 额外扩展内容如下文:
```typescript
type NodeModelData = NodeModelData & NodeShapeStyles & { lodLevels?: LodLevel[] };
```
### NodeDisplayModelData.lodLevels
对于该节点而言,设定图缩放等级的划分方式。是一个缩放系数范围的数组,表示缩放等级的划分。其中有一项的 `primary` 应当为 `true`,代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。
- **是否必须**: 否;
- **类型**: `LodLevel`[],其中 `LodLevel` 如下表:
| Name | Type | Description |
| :---------- | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `zoomRange` | `[number, number]` | 本层级所定义的图缩放等级范围,当图缩放等级 zoom >= zoomRange[0] && zoom < zoomRange[1] 表示在该层级下 |
| `primary` | `boolean` | 是否为主层级,若为 `true` 则代表该层级的序号为 0`zoomRange` 小于当前层级的,序号递减;大于当前层级的,序号递增。序号为在下面的图形配置中 `lod` 所对应的值。在 `NodeDisplayModelData.lodLevels` 中,应当只有一个层级为 `primary: true` |
### NodeDisplayModelData.animates
出现、消失、显示、隐藏、更新时,各个图形动画配置。支持一次更新,多个动画的顺序执行(`order`)。[动画 DEMO](/zh/examples/scatter/changePosition/#itemAnimates)。
- **是否必须**: 否;
- **类型**: `IAnimates`,定义如下:
```typescript
interface IAnimates {
buildIn?: IAnimate[]; // 节点中某些图形创建时的动画
buildOut?: IAnimate[]; // 节点中某些图形销毁时的动画
show?: IAnimate[]; // 节点中某些图形从隐藏变为显示时的动画
hide?: IAnimate[]; // 节点中某些图形从显示变为隐藏时的动画
update?: (IAnimate | IStateAnimate)[]; // 节点中某些图形在相关数据或状态更新时的动画
}
```
其中,`IAnimate` 定义如下:
| Name | Type | Default | Description |
| :--------------------- | :--------- | :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `IAnimate.fields` | `string[]` | `undefined` | 该动画相关的图形样式属性名称,例如 `['fill', 'lineWidth']` |
| `IAnimate.shapeId` | `string` | `group` | 该动画需要在哪个图形上执行,此处指定该图形的 ID。不指定则代表整个图形分组上的动画 |
| `IAnimate.order?` | `number` | `0` | 该动画在 `IAnimate[]` 中执行的顺序,借此可实现一次更新多个动画的顺序播放 |
| `IAnimate.duration?` | `number` | `500` | 该动画执行一次所使用的时间,该值越小,则动画速度越快 |
| `IAnimate.iterations?` | `number` | `1` | 该动画执行的次数,-1 代表循环执行 |
| `IAnimate.easing?` | `string` | `'cubic-bezier(0.250, 0.460, 0.450, 0.940)'` | 该动画的缓动函数,可以设置的值可参考 [MDN easing 定义](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#easing) |
`IStateAnimate` 定义如下,即在 `IAnimate` 基础上增加了一个指定状态的字段 `states`,表示该动画在这些状态变更的时候执行:
```typescript
interface IStateAnimate extends IAnimate {
states: string[];
}
```
### NodeDisplayModelData.keyShape
节点主图形的样式配置。节点的主图形表达了节点的主要形状。还用于计算边的连入位置。
- **是否必须**: 否;
- **类型**: `ShapeStyle`,根据不同的主图形,图形样式配置项不同。例如 `'circle-node'` 的主图形是 `'circle'` 参考 [Circle 图形样式](../shape/CircleStyleProps.zh.md)`'image-node'` 的主图形是 `'image'` 参考 [Image 图形样式](../shape/ImageStyleProps.zh.md)。
### NodeDisplayModelData.iconShape
节点中心的图标图形(除 `'modelRect-node'` 以外的内置节点支持,继承这些内置节点的自定义节点在无复写相关内容的情况下同样支持),可以是图片或文本,文本支持 iconfont (设置 `fontFamily: 'iconfont'`)。
- **是否必须**: 否;
- **类型**:
```typescript
Partial<
TextStyleProps &
ImageStyleProps &
ShapeStyle & {
offsetX?: number;
offsetY?: number;
lod?: number;
}
>;
```
其中,相关的图形样式参考 [`TextStyleProps` 文本图形样式](../shape/TextStyleProps.zh.md),和 [`ImageStyleProps` 图片图形样式](../shape/ImageStyleProps.zh.md)。
### NodeDisplayModelData.haloShape
在内置的节点和主题中,`haloShape` 指的是节点在 `active`(一般在鼠标 hover 时该状态被触发) 和 `selected`(一般在选中状态下该状态被触发) 状态下,主图形 (`keyShape`) 周围展示的光晕效果的图形。在内置节点的逻辑中,`haloShape` 的图形类型、颜色跟随主图形 (`keyShape`)。
- **是否必须**: 否;
- **类型**: `ShapeStyle``haloShape` 的图形类型跟随主图形(`keyShape`)。根据不同的主图形,图形样式配置项不同。例如 `'circle-node'` 的主图形是 `'circle'` 参考 [Circle 图形样式](../shape/CircleStyleProps.zh.md)`'image-node'` 的主图形是 `'image'` 参考 [Image 图形样式](../shape/ImageStyleProps.zh.md)。
### NodeDisplayModelData.labelShape
节点的文本图形,内置节点或继承内置节点(未复写相关内容)的自定义节点均支持。
- **是否必须**: 否;
- **类型**:
```typescript
TextStyleProps & {
/**
* 文本相对于节点主图形 (keyShape) 的位置,支持在主图形的上方、下方、左方、右方、中间
*/
position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
/**
* 文本图形相对于主图形 (keyShape) 在 x 方向上的偏移量
*/
offsetX?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 y 方向上的偏移量
*/
offsetY?: number;
/**
* 文本图形相对于主图形 (keyShape) 在 z 方向上的偏移量
*/
offsetZ?: number;
/**
* 允许文本的最大宽度,若指定为数字,则表示像素值,若指定为带有 '%' 的文本,代表相对于主图形 (keyShape) 包围盒大小的百分比。默认值为 '200%',表示文本图形的最大宽度不可以超过主图形宽度的两倍。若超过,则自动截断并在末尾增加省略号 '...'
*/
maxWidth?: string | number;
/**
* 文本旋转角度(弧度制)
*/
angle?: number;
};
```
其中,相关的图形样式参考 [`TextStyleProps` 文本图形样式](../shape/TextStyleProps.zh.md)。
### NodeDisplayModelData.labelBackgroundShape
节点的文本的背景图形,是一个矩形。若不设置则不显示。设置为 `{}` 将使用主题中默认的样式显示文本背景图形。
- **是否必须**: 否;
- **类型**:
```typescript
ShapeStyle & {
padding?: number | number[]; // 文本距离背景矩形四周的留白距离
};
```
其中,参考矩形样式类型 [`RectStyleProps`](../shape/RectStyleProps.zh.md)。
### NodeDisplayModelData.badgeShapes
节点四周的徽标单个徽标包括了文本和背景图形badgeShapes 配置的是多个徽标。[节点徽标 DEMO](/zh/examples/item/defaultNodes/#circle)。
- **是否必须**: 否;
- **类型**:
```typescript
{
/**
* 徽标的背景颜色(对所有徽标生效,优先级低于下面单个徽标的 color 设置)
*/
color?: string;
/**
* 徽标背景颜色的色板,意味着下面各个徽标将自动取用该色板中的颜色。
* 优先级低于下面单个徽标的 color 设置
*/
palette?: string[];
/**
* 徽标上文本的颜色(对所有徽标生效,优先级低于下面单个徽标的 textColor 设置)
*/
textColor?: string;
/**
* 单个徽标的样式配置,由县局高于上面的配置
*/
[key: number]: ShapeStyle & {
/**
* 该徽标的位置,支持的取值见下文
*/
position?: IBadgePosition;
/**
* 该徽标的背景色
*/
color?: string;
/**
* 该徽标的文本色
*/
textColor?: string;
};
}
```
`BadgePosition` 取值如下:
| Value | Description |
| :-------------- | :------------------------- |
| `'rightTop'` | 右上角,推荐 |
| `'right'` | 右侧中间,推荐 |
| `'rightBottom'` | 右下角,推荐 |
| `'leftTop'` | 左上角 |
| `'left'` | 左侧中间 |
| `'leftBottom'` | 左下角 |
| `'bottom'` | 下方中间 |
| `'top'` | 上方中间 |
| `'bottomRight'` | 右下角,同 `'rightBottom'` |
| `'bottomLeft'` | 左下角,同 `'leftBottom'` |
| `'topRight'` | 右上角,同 `'rightTop'` |
| `'topLeft'` | 左上角,同 `'leftTop'` |
### NodeDisplayModelData.anchorShapes
节点四周的边连入位置圆形图形连接桩anchorShapess 配置的是多个连接桩。[节点连接桩 DEMO](/zh/examples/item/defaultNodes/#circle)。
- **是否必须**: 否;
- **类型**:
```typescript
// 外层可配置对所有连接桩(圆形)的样式,优先级低于单独的连接桩配置
CircleStyleProps & {
// 单独的连接桩图形配置,优先级高于外层的 CircleStyleProps
[key: number]: CircleStyleProps & {
// 该连接桩的位置,可配置字符串或数字数组表示相对于主图形 (keyShape) 包围盒的百分比位置,例如 [0.5, 1] 表示位于主图形的右侧中间
position?: 'top' | 'left' | 'bottom' | 'right' | [number, number];
};
};
```
其中,相关的图形样式参考 [`CircleStyleProps` 圆形图形样式](../shape/CircleStyleProps.zh.md)。
### NodeDisplayModelData.otherShapes
上面所有的 xxShape(s) 均为 G6 定义的规范节点中可能存在的图形。自定义节点中的其他图形应当定义和配置在 `otherShapes` 中。
- **是否必须**: 否;
- **类型**:
```typescript
{
// key 为图形 id规范格式为 xxShape
// value 为图形样式配置(不同图形配置不同,见图形相关文档),以及图形的动画
[shapeId: string]: ShapeStyleProps;
}
```
其中,不同的图形样式参考[图形样式](../shape/BaseStyleProps.zh.md)目录下对应的图形类型文档。

View File

@ -0,0 +1,150 @@
---
title: NodeModel
order: 6
---
NodeModel represents the internal data of a node that flows within the graph instance. It is derived from [`NodeUserModel`](./NodeUserModel.zh.md) through calculations performed on the graph instance. This data is consumed in any subsequent usage. Each node item inherits from [`NodeUserModel`](./NodeUserModel.zh.md) and is defined as follows:
```typescript
interface NodeModel {
id: string | number;
data: NodeModelData; // = NodeModelData
}
```
## id
The unique ID of the node. Once the node is created, the ID cannot be modified.
- **Required**: True;
- **Type**: `string|number`
## data
The data in InnerModelData is the result of applying a series of transforms on UserModelData through the graph instance. The business data may have been transformed, filtered, or merged.
- **Required**: True;
- **Type**: `NodeModelData`, Same as [`NodeUserModelData`](./NodeUserModel.zh.md#nodeusermodeldatatype), defined as follows:
### NodeModelData.type
The rendering type of the node. It can be a registered node type of the graph class. The built-in and default registered types are `'circle-node'`, `'rect-node'`, and `'image-node'`. `'circle-node'` by default.
- **Required**: False;
- **Type**: `string`;
### NodeModelData.x
The x-axis position of the node. If the node position is not specified and the `layout` is not configured for the graph instance, the node may be rendered in the top-left corner of the canvas.
- **Required**: False;
- **Type**: `number`;
### NodeModelData.y
The y-axis position of the node. If the node position is not specified and the `layout` is not configured for the graph instance, the node may be rendered in the top-left corner of the canvas.
- **Required**: False;
- **Type**: `number`;
### NodeModelData.z
For 2D graphs, the z-value does not need to be specified. If specified, it may cause nodes to be invisible under the WebGL renderer. In 3D graphs, the z-value is required and represents the node's z-axis position. If the node position is not specified and the `layout` is not configured for the graph instance, the node may be rendered in the top-left corner of the canvas.
- **Required**: False;
- **Type**: `number`;
### NodeModelData.visible
Whether the node is visible by default.
- **Required**: False;
- **Type**: `boolean`;
### NodeModelData.color
The theme color of the main graph (keyShape) of the node, represented as a hexadecimal string. This is provided for convenient simple configuration, and more style configurations should be done in the node mapper of the graph instance, configuring the keyShape and various graphical styles.
- **Required**: False;
- **Type**: `string`;
### NodeModelData.label
The text content of the labelShape of the node. This is provided for convenient simple configuration, and more style configurations should be done in the node mapper of the graph instance, configuring the text value of the labelShape or other graphical styles.
- **Required**: False;
- **Type**: `string`;
### NodeModelData.badges
The configuration of badges around the node. The configurable positions `BadgePosition` are as follows. This is provided for convenient simple configuration, and more style configurations should be done in the node mapper of the graph instance, configuring the graphical styles of badgeShapes.
- **Required**: False;
- **Type**:
```typescript
{
position: BadgePosition,
type: 'text' | 'icon',
img?: string, // required when type is 'text'
text?: string, // required when type is 'icon'
}[];
```
```typescript
BadgePosition: 'rightTop' |
'right' |
'rightBottom' |
'bottomRight' |
'bottom' |
'bottomLeft' |
'leftBottom' |
'left' |
'leftTop' |
'topLeft' |
'top' |
'topRight';
```
### NodeModelData.icon
The configuration of the central icon of the node. This is provided for convenient simple configuration, and more style configurations should be done in the node mapper of the graph instance, configuring the graphical styles of the iconShape.
- **Required**: False;
- **Type**:
```typescript
{
type: 'text' | 'icon',
img?: string, // required when type is 'text'
text?: string, // required when type is 'icon'
}
```
### NodeModelData.anchorPoints
The positions at which the edges are connected to the node, also known as the entry points of the edges. If not configured, the edges will automatically find the nearest positions on the node's edge for connection. For example, `[[0,0.5],[1,0.5]]`, where the numbers represent the percentage positions relative to the node's main graph (keyShape) in the x or y direction. This is provided for convenient simple configuration, and more style configurations should be done in the node mapper of the graph instance, configuring the graphical styles of anchorShapes.
- **Required**: False;
- **Type**: `number[][]`;
### NodeModelData.parentId
For graphs with combos, it represents the ID of the combo to which the node belongs.
- **Required**: False;
- **Type**: `string | number`;
### NodeModelData.isRoot
If you want to display this data as a tree graph and use a tree layout, specify whether this node is one of the root nodes of the tree.
- **Required**: False;
- **Type**: `boolean`;
### NodeModelData.preventPolylineEdgeOverlap
Whether to treat this node as an obstacle for avoiding `'polyline-edge'` type edges. The default value is `false`.
- **Required**: False;
- **Type**: `boolean`;

View File

@ -0,0 +1,150 @@
---
title: NodeModel 内部数据
order: 6
---
NodeModel 为内部流转的节点数据,由 NodeUserModel 经过皮质在图实例上的 transforms 计算而得。后续您在任意地方消费的都是这一份数据。每一项节点的类型继承自 [`NodeUserModel`](./NodeUserModel.zh.md),扩展后定义如下:
```typescript
interface NodeModel {
id: string | number;
data: NodeModelData; // = NodeModelData
}
```
## id
节点的唯一 ID节点创建后ID 不可被修改。
- **是否必须**: 是;
- **类型**: `string|number`
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: `NodeModelData`,同 [`NodeUserModelData`](./NodeUserModel.zh.md#nodeusermodeldatatype) 定义如下:
### NodeModelData.type
节点的渲染类型,可以是已经注册到图类上的节点类型,内置并默认注册的有 `'circle-node'``'rect-node'``'image-node'`。默认为 `'circle-node'`
- **是否必须**: 否;
- **类型**: `string`
### NodeModelData.x
节点的 x 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
- **是否必须**: 否;
- **类型**: `number`
### NodeModelData.y
节点的 y 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
- **是否必须**: 否;
- **类型**: `number`
### NodeModelData.z
对于 2D 的图,不需要指定 z 值。若指定可能导致 WebGL 渲染器下节点看不见。在 3D 图中z 值是必须的,代表节点的 z 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
- **是否必须**: 否;
- **类型**: `number`
### NodeModelData.visible
节点是否默认展示出来。
- **是否必须**: 否;
- **类型**: `boolean`
### NodeModelData.color
该节点主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 keyShape 以及各种图形的图形样式。
- **是否必须**: 否;
- **类型**: `string`
### NodeModelData.label
节点 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 labelShape 的 text 值或其他图形样式。
- **是否必须**: 否;
- **类型**: `string`
### NodeModelData.badges
节点四周的徽标配置,其中的可配置的位置 `BadgePosition` 见后方。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 `badgeShapes` 的图形样式。
- **是否必须**: 否;
- **类型**:
```typescript
{
position: BadgePosition,
type: 'text' | 'icon',
img?: string, // type 为 'text' 时需要提供
text?: string, // type 为 'icon' 时需要提供
}[];
```
```typescript
BadgePosition: 'rightTop' |
'right' |
'rightBottom' |
'bottomRight' |
'bottom' |
'bottomLeft' |
'leftBottom' |
'left' |
'leftTop' |
'topLeft' |
'top' |
'topRight';
```
### NodeModelData.icon
节点中心 icon 的配置。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 iconShape 的图形样式。
- **是否必须**: 否;
- **类型**:
```typescript
{
type: 'text' | 'icon',
img?: string, // type 为 'text' 时需要提供
text?: string, // type 为 'icon' 时需要提供
}
```
### NodeModelData.anchorPoints
该节点四周连接图形的位置,也是边连入的位置。若不配置,边则自动寻找节点边缘最近的位置进行连接。例如 `[[0,0.5],[1,0.5]]`,数字表示在 x 或 y 方向上相对于节点主图形keyShape的百分比位置。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 anchorShapes 的图形样式。
- **是否必须**: 否;
- **类型**: `number[][]`
### NodeModelData.parentId
在有 combo 的图上表示该节点所属的 combo 的 id。
- **是否必须**: 否;
- **类型**: `string | number`
### NodeModelData.isRoot
若要将该份数据作为树图展示,同时使用树图布局时,指定该节点是否为树的根节点之一。
- **是否必须**: 否;
- **类型**: `boolean`
### NodeModelData.preventPolylineEdgeOverlap
是否将该节点作为一个障碍物,使 `'polyline-edge'` 类型的边躲避。默认为 `false`
- **是否必须**: 否;
- **类型**: `boolean`

View File

@ -14,69 +14,71 @@ interface NodeUserModel {
## id ## id
The unique ID of the node. Once the node is created, the ID cannot be changed.
- **Required**: True; - **Required**: True;
- **Type**: `string|number`; - **Type**: `string|number`;
The unique ID of the node. Once the node is created, the ID cannot be changed.
## data ## data
The data of the node, excluding the ID. It is recommended to store business data. If data conversion is needed, it can be done through the transform function configured in the Graph instance, see [Specification.transforms](../graph/Specification.en.md#transforms). The converted data becomes the internal data that circulates within the graph. All subsequent accesses will be based on this internal data. For rendering-related data, it can be mapped using the node mapper of the Graph instance, see [Specification.node](../graph/Specification.en.md#node) The input of this mapper is the internal data, and the generated display data is only consumed by the renderer. Users will not obtain it anywhere.
- **Required**: True; - **Required**: True;
- **Type**: [`NodeUserModelData`](#nodeusermodeldatatype); - **Type**: [`NodeUserModelData`](#nodeusermodeldatatype);
The data of the node, excluding the ID. It is recommended to store business data. If data conversion is needed, it can be done through the transform function configured in the Graph instance, see [Specification.transforms](../graph/Specification.en.md#transforms). The converted data becomes the internal data that circulates within the graph. All subsequent accesses will be based on this internal data. For rendering-related data, it can be mapped using the node mapper of the Graph instance, see [Specification.node](../graph/Specification.en.md#node) The input of this mapper is the internal data, and the generated display data is only consumed by the renderer. Users will not obtain it anywhere.
### NodeUserModelData.type ### NodeUserModelData.type
Type: string The rendering type of the node. It can be a node type that has been registered with the graph class. Built-in and default registered types include `'circle-node'`, `'rect-node'`, and `'image-node'`.
- **Required**: False; - **Required**: False;
- **Type**: `string`; - **Type**: `string`;
Type: string The rendering type of the node. It can be a node type that has been registered with the graph class. Built-in and default registered types include `'circle-node'`, `'rect-node'`, and `'image-node'`.
### NodeUserModelData.x ### NodeUserModelData.x
- **Required**: False;
- **Type**: `number`;
Type: number The x-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas. Type: number The x-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas.
### NodeUserModelData.y
- **Required**: False; - **Required**: False;
- **Type**: `number`; - **Type**: `number`;
### NodeUserModelData.y
The y-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas. The y-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas.
- **Required**: False;
- **Type**: `number`;
### NodeUserModelData.z ### NodeUserModelData.z
For 2D graphs, there is no need to specify the z value. If it is specified, it may cause the node to be invisible under the WebGL renderer. In 3D graphs, the z value is required and represents the z-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas.
- **Required**: False; - **Required**: False;
- **Type**: `number`; - **Type**: `number`;
For 2D graphs, there is no need to specify the z value. If it is specified, it may cause the node to be invisible under the WebGL renderer. In 3D graphs, the z value is required and represents the z-axis position of the node. If the node position is not specified and no `layout` is configured for the graph instance, the node may be rendered at the top left corner of the canvas.
### NodeUserModelData.visible ### NodeUserModelData.visible
Whether the node is displayed by default.
- **Required**: False; - **Required**: False;
- **Type**: `boolean`; - **Type**: `boolean`;
Whether the node is displayed by default.
### NodeUserModelData.color ### NodeUserModelData.color
- **Required**: False;
- **Type**: `string`;
The main color of the primary shape (keyShape) of the node, expressed as a hexadecimal string. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the keyShape and various graphic styles are configured. The main color of the primary shape (keyShape) of the node, expressed as a hexadecimal string. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the keyShape and various graphic styles are configured.
- **Required**: False;
- **Type**: `string`;
### NodeUserModelData.label ### NodeUserModelData.label
The text content of the label shape of the node. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the text value of the labelShape or other graphic styles are configured.
- **Required**: False; - **Required**: False;
- **Type**: `string`; - **Type**: `string`;
The text content of the label shape of the node. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the text value of the labelShape or other graphic styles are configured.
### NodeUserModelData.badges ### NodeUserModelData.badges
The configuration of the badges around the node. The possible positions `BadgePosition` are as follows. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the badgeShapes are configured.
- **Required**: False; - **Required**: False;
- **Type**: - **Type**:
@ -89,8 +91,6 @@ The text content of the label shape of the node. This is provided for simple con
}[]; }[];
``` ```
The configuration of the badges around the node. The possible positions `BadgePosition` are as follows. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the badgeShapes are configured.
```typescript ```typescript
BadgePosition: 'rightTop' | BadgePosition: 'rightTop' |
'right' | 'right' |
@ -108,6 +108,8 @@ BadgePosition: 'rightTop' |
### NodeUserModelData.icon ### NodeUserModelData.icon
The configuration of the central icon of the node. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the iconShape are configured.
- **Required**: False; - **Required**: False;
- **Type**: - **Type**:
@ -119,32 +121,30 @@ BadgePosition: 'rightTop' |
} }
``` ```
The configuration of the central icon of the node. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the iconShape are configured.
### NodeUserModelData.anchorPoints ### NodeUserModelData.anchorPoints
The positions where the edges are connected to the node. If not configured, the edges will automatically find the nearest positions on the edge of the node for connection. For example, `[[0,0.5],[1,0.5]]`, where the numbers indicate the percentage position relative to the primary shape (keyShape) of the node in the x or y direction. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the anchorShapes are configured.
- **Required**: False; - **Required**: False;
- **Type**: `number[][]`; - **Type**: `number[][]`;
The positions where the edges are connected to the node. If not configured, the edges will automatically find the nearest positions on the edge of the node for connection. For example, `[[0,0.5],[1,0.5]]`, where the numbers indicate the percentage position relative to the primary shape (keyShape) of the node in the x or y direction. This is provided for simple configuration. More style configurations should be done in the node mapper of the graph instance, where the graphic styles of the anchorShapes are configured.
### NodeUserModelData.parentId ### NodeUserModelData.parentId
In a graph with combos, it indicates the ID of the combo to which the node belongs.
- **Required**: False; - **Required**: False;
- **Type**: `string | number`; - **Type**: `string | number`;
In a graph with combos, it indicates the ID of the combo to which the node belongs.
### NodeUserModelData.isRoot ### NodeUserModelData.isRoot
- **Required**: False;
- **Type**: `boolean`;
If you want to display the data as a tree diagram and use tree layout at the same time, specify whether this node is one of the root nodes of the tree. If you want to display the data as a tree diagram and use tree layout at the same time, specify whether this node is one of the root nodes of the tree.
### NodeUserModelData.preventPolylineEdgeOverlap
- **Required**: False; - **Required**: False;
- **Type**: `boolean`; - **Type**: `boolean`;
### NodeUserModelData.preventPolylineEdgeOverlap
Whether to treat this node as an obstacle and make it avoid the `'polyline-edge'` type of edges. The default value is `false`. Whether to treat this node as an obstacle and make it avoid the `'polyline-edge'` type of edges. The default value is `false`.
- **Required**: False;
- **Type**: `boolean`;

View File

@ -1,5 +1,5 @@
--- ---
title: NodeUserModel title: NodeUserModel 输入数据
order: 3 order: 3
--- ---
@ -14,69 +14,71 @@ interface NodeUserModel {
## id ## id
节点的唯一 ID节点创建后ID 不可被修改。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: `string|number` - **类型**: `string|number`
节点的唯一 ID节点创建后ID 不可被修改。
## data ## data
节点除 ID 以外的的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的节点 mapper 进行映射,见 [Specification.node](../graph/Specification.zh.md#node),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
- **是否必须**: 是; - **是否必须**: 是;
- **类型**: [`NodeUserModelData`](#nodeusermodeldatatype),详细见下文 - **类型**: [`NodeUserModelData`](#nodeusermodeldatatype),详细见下文
节点除 ID 以外的的数据,建议存放业务数据。若需要进行数据转换,可通过 Graph 实例的 transform 配置转换函数,见 [Specification.transforms](../graph/Specification.zh.md#transforms)。转换后的数据成为内部流通的数据 Inner Data后续所有地方获取的都是这份内部数据。与渲染有关的可以通过 Graph 实例的节点 mapper 进行映射,见 [Specification.node](../graph/Specification.zh.md#node),该 mapper 的输入是 Inner Data生成的结果 Display Data 只交给渲染器消费,用户不会在任何地方获得。
### NodeUserModelData.type ### NodeUserModelData.type
节点的渲染类型,可以是已经注册到图类上的节点类型,内置并默认注册的有 `'circle-node'``'rect-node'``'image-node'`。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `string` - **类型**: `string`
节点的渲染类型,可以是已经注册到图类上的节点类型,内置并默认注册的有 `'circle-node'``'rect-node'``'image-node'`。
### NodeUserModelData.x ### NodeUserModelData.x
- **是否必须**: 否;
- **类型**: `number`
节点的 x 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。 节点的 x 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
### NodeUserModelData.y
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `number` - **类型**: `number`
### NodeUserModelData.y
节点的 y 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。 节点的 y 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
- **是否必须**: 否;
- **类型**: `number`
### NodeUserModelData.z ### NodeUserModelData.z
对于 2D 的图,不需要指定 z 值。若指定可能导致 WebGL 渲染器下节点看不见。在 3D 图中z 值是必须的,代表节点的 z 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `number` - **类型**: `number`
对于 2D 的图,不需要指定 z 值。若指定可能导致 WebGL 渲染器下节点看不见。在 3D 图中z 值是必须的,代表节点的 z 轴位置。若未指定节点位置,且未为图实例配置 `layout`(布局),则节点可能被渲染在画布左上角。
### NodeUserModelData.visible ### NodeUserModelData.visible
节点是否默认展示出来。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `boolean` - **类型**: `boolean`
节点是否默认展示出来。
### NodeUserModelData.color ### NodeUserModelData.color
- **是否必须**: 否;
- **类型**: `string`
该节点主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 keyShape 以及各种图形的图形样式。 该节点主图形keyShape的主题色值为十六进制字符串。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 keyShape 以及各种图形的图形样式。
- **是否必须**: 否;
- **类型**: `string`
### NodeUserModelData.label ### NodeUserModelData.label
节点 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 labelShape 的 text 值或其他图形样式。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `string` - **类型**: `string`
节点 labelShape 的文本内容。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 labelShape 的 text 值或其他图形样式。
### NodeUserModelData.badges ### NodeUserModelData.badges
节点四周的徽标配置,其中的可配置的位置 `BadgePosition` 如下。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 badgeShapes 的图形样式。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: - **类型**:
@ -89,8 +91,6 @@ interface NodeUserModel {
}[]; }[];
``` ```
节点四周的徽标配置,其中的可配置的位置 `BadgePosition` 如下。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 badgeShapes 的图形样式。
```typescript ```typescript
BadgePosition: 'rightTop' | BadgePosition: 'rightTop' |
'right' | 'right' |
@ -108,6 +108,8 @@ BadgePosition: 'rightTop' |
### NodeUserModelData.icon ### NodeUserModelData.icon
节点中心 icon 的配置。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 iconShape 的图形样式。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: - **类型**:
@ -119,32 +121,30 @@ BadgePosition: 'rightTop' |
} }
``` ```
节点中心 icon 的配置。为方便简单配置而提供,更多的样式配置应当在 Graph 实例的节点 mapper 中配置 iconShape 的图形样式。
### NodeUserModelData.anchorPoints ### NodeUserModelData.anchorPoints
该节点四周连接图形的位置,也是边连入的位置。若不配置,边则自动寻找节点边缘最近的位置进行连接。例如 `[[0,0.5],[1,0.5]]`,数字表示在 x 或 y 方向上相对于节点主图形keyShape的百分比位置。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 anchorShapes 的图形样式。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `number[][]` - **类型**: `number[][]`
该节点四周连接图形的位置,也是边连入的位置。若不配置,边则自动寻找节点边缘最近的位置进行连接。例如 `[[0,0.5],[1,0.5]]`,数字表示在 x 或 y 方向上相对于节点主图形keyShape的百分比位置。为方便简单配置而提供更多的样式配置应当在 Graph 实例的节点 mapper 中配置 anchorShapes 的图形样式。
### NodeUserModelData.parentId ### NodeUserModelData.parentId
在有 combo 的图上表示该节点所属的 combo 的 id。
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `string | number` - **类型**: `string | number`
在有 combo 的图上表示该节点所属的 combo 的 id。
### NodeUserModelData.isRoot ### NodeUserModelData.isRoot
- **是否必须**: 否;
- **类型**: `boolean`
若要将该份数据作为树图展示,同时使用树图布局时,指定该节点是否为树的根节点之一。 若要将该份数据作为树图展示,同时使用树图布局时,指定该节点是否为树的根节点之一。
### NodeUserModelData.preventPolylineEdgeOverlap
- **是否必须**: 否; - **是否必须**: 否;
- **类型**: `boolean` - **类型**: `boolean`
### NodeUserModelData.preventPolylineEdgeOverlap
是否将该节点作为一个障碍物,使 `'polyline-edge'` 类型的边躲避。默认为 `false` 是否将该节点作为一个障碍物,使 `'polyline-edge'` 类型的边躲避。默认为 `false`
- **是否必须**: 否;
- **类型**: `boolean`

View File

@ -1,4 +0,0 @@
---
title: ComboDisplayModel
order: 12
---

View File

@ -1,31 +0,0 @@
---
title: ComboDisplayModel
order: 12
---
渲染/展示数据的 Combo 类型继承自 [`ComboInnerModel`](./ComboInnerModel.zh.md),扩展后定义如下:
```typescript
interface ComboDisplayModel {
id: string | number;
data: ComboDisplayModelData; // 扩展了 ComboInnerModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
节点的唯一 ID节点创建后ID 不可被修改。
## data
DisplayModelData 中的数据已经是 UserInnerModel 通过 Graph 实例上配置的对应 mappere.g. 节点为 [specification.node](../graph/Specification.zh.md#node),边是 [specification.edge](../graph/Specification.zh.md#edge)combo 是 [specification.combo](../graph/Specification.zh.md#combo))映射后的结果,这里面应当存储所有 UserInnerModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`ComboDisplayModelData`](#combodisplaymodeldataxxx),基于 `ComboInnerModel` 额外扩展内容如下文:
### ComboDisplayModelData.xxx
TODO

View File

@ -1,4 +0,0 @@
---
title: ComboInnerModel
order: 9
---

View File

@ -1,31 +0,0 @@
---
title: ComboInnerModel
order: 8
---
内部流转数据中,每一项 Combo 的类型继承自 [`ComboUserModel`](./ComboUserModel.zh.md),扩展后定义如下:
```typescript
interface ComboInnerModel {
id: string | number;
data: ComboInnerModelData; // 扩展了 ComboUserModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
节点的唯一 ID节点创建后ID 不可被修改。
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: [`ComboInnerModelData`](#comboinnermodeldataxxx),基于 `ComboUserModel` 额外扩展内容如下文:
### ComboInnerModelData.xxx
TODO

View File

@ -1,4 +0,0 @@
---
title: EdgeDisplayModel
order: 11
---

View File

@ -1,47 +0,0 @@
---
title: EdgeDisplayModel
order: 11
---
边的渲染/展示数据类型继承自 [`EdgeInnerModel`](./EdgeInnerModel.zh.md),扩展后定义如下:
```typescript
interface EdgeDisplayModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeDisplayModelData; // 扩展了 EdgeInnerModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
边的唯一 ID节点创建后ID 不可被修改。
## source
- **是否必须**: 是;
- **类型**: `string|number`
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## target
- **是否必须**: 是;
- **类型**: `string|number`
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## data
DisplayModelData 中的数据已经是 UserInnerModel 通过 Graph 实例上配置的对应 mappere.g. 节点为 [specification.node](../graph/Specification.zh.md#node),边是 [specification.edge](../graph/Specification.zh.md#edge)combo 是 [specification.combo](../graph/Specification.zh.md#combo))映射后的结果,这里面应当存储所有 UserInnerModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`EdgeDisplayModelData`](#edgedisplaymodeldatatype)
### EdgeDisplayModelData.xxx
TODO

View File

@ -1,4 +0,0 @@
---
title: EdgeInnerModel
order: 8
---

View File

@ -1,47 +0,0 @@
---
title: EdgeInnerModel
order: 8
---
内部流转数据中,每一项边的类型继承自 [`EdgeUserModel`](./EdgeUserModel.zh.md),扩展后定义如下:
```typescript
interface EdgeInnerModel {
id: string | number;
source: string | number;
target: string | number;
data: EdgeInnerModelData; // 扩展了 EdgeUserModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
边的唯一 ID节点创建后ID 不可被修改。
## source
- **是否必须**: 是;
- **类型**: `string|number`
边起始节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## target
- **是否必须**: 是;
- **类型**: `string|number`
边结束节点的 ID应与 `nodes` 中的一项对应,否则该边数据不会被加入到图中。
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: [`EdgeInnerModelData`](#edgeinnermodeldatatype)
### EdgeInnerModelData.xxx
TODO

View File

@ -1,4 +0,0 @@
---
title: NodeDisplayModel
order: 10
---

View File

@ -1,31 +0,0 @@
---
title: NodeDisplayModel
order: 10
---
渲染/展示数据的节点类型继承自 [`NodeInnerModel`](./NodeInnerModel.zh.md),扩展后定义如下:
```typescript
interface NodeDisplayModel {
id: string | number;
data: NodeDisplayModelData; // 扩展了 NodeInnerModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
节点的唯一 ID节点创建后ID 不可被修改。
## data
DisplayModelData 中的数据已经是 UserInnerModel 通过 Graph 实例上配置的对应 mappere.g. 节点为 [specification.node](../graph/Specification.zh.md#node),边是 [specification.edge](../graph/Specification.zh.md#edge)combo 是 [specification.combo](../graph/Specification.zh.md#combo))映射后的结果,这里面应当存储所有 UserInnerModel 的内容,再额外加上许多的图形样式配置。
- **是否必须**: 是;
- **类型**: [`NodeDisplayModelData`](#nodedisplaymodeldataxxx),基于 `NodeInnerModel` 额外扩展内容如下文:
### NodeDisplayModelData.xxx
TODO

View File

@ -1,4 +0,0 @@
---
title: NodeDisplayModel
order:
---

View File

@ -1,31 +0,0 @@
---
title: NodeInnerModel
order: 6
---
内部流转数据中,每一项节点的类型继承自 [`NodeUserModel`](./NodeUserModel.zh.md),扩展后定义如下:
```typescript
interface NodeInnerModel {
id: string | number;
data: NodeInnerModelData; // 扩展了 NodeUserModelData
}
```
## id
- **是否必须**: 是;
- **类型**: `string|number`
节点的唯一 ID节点创建后ID 不可被修改。
## data
InnerModelData 中的数据已经是 UserModelData 通过 Graph 实例的一系列 transform 函数生成的结果,业务数据可能已经被转换、过滤、合并。
- **是否必须**: 是;
- **类型**: [`NodeInnerModelData`](#nodeinnermodeldataxxx),基于 `NodeUserModel` 额外扩展内容如下文:
### NodeInnerModelData.xxx
TODO

View File

@ -1,147 +0,0 @@
---
title: NodeShapeStyles
---
[Overview - v5.0.0-beta.21](../../README.en.md) / [Modules](../../modules.en.md) / [item](../../modules/item.en.md) / NodeShapeStyles
[item](../../modules/item.en.md).NodeShapeStyles
## Hierarchy
- `ItemShapeStyles`
**`NodeShapeStyles`**
## Properties
### anchorShapes
`Optional` **anchorShapes**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `[key: number]`: [`ShapeStyle`](../../modules/item.en.md#shapestyle) & { `color?`: `string` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `position?`: [`BadgePosition`](../../enums/item/BadgePosition.en.md) ; `size?`: `number` ; `textColor?`: `string` }; `color?`: `string` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `size?`: `number` ; `textColor?`: `string` }
#### Defined in
[packages/g6/src/types/node.ts:156](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L156)
---
### animates
`Optional` **animates**: `IAnimates`
#### Inherited from
ItemShapeStyles.animates
#### Defined in
[packages/g6/src/types/item.ts:169](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L169)
---
### badgeShapes
`Optional` **badgeShapes**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `[key: number]`: [`ShapeStyle`](../../modules/item.en.md#shapestyle) & { `color?`: `string` ; `position?`: [`IBadgePosition`](../../modules/item.en.md#ibadgeposition) ; `textColor?`: `string` }; `color?`: `string` ; `palette?`: `string`[] ; `textColor?`: `string` }
Style of the badges to show on the node.
#### Defined in
[packages/g6/src/types/node.ts:136](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L136)
---
### group
`Optional` **group**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.group
#### Defined in
[packages/g6/src/types/item.ts:165](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L165)
---
### haloShape
`Optional` **haloShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.haloShape
#### Defined in
[packages/g6/src/types/item.ts:164](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L164)
---
### iconShape
`Optional` **iconShape**: `Partial`<[`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `lod?`: `number` ; `offsetX?`: `number` ; `offsetY?`: `number` }\>
#### Inherited from
ItemShapeStyles.iconShape
#### Defined in
[packages/g6/src/types/item.ts:155](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L155)
---
### keyShape
`Optional` **keyShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.keyShape
#### Defined in
[packages/g6/src/types/item.ts:154](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L154)
---
### labelBackgroundShape
`Optional` **labelBackgroundShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `padding?`: `number` \| `number`[] }
The background style of the label
#### Defined in
[packages/g6/src/types/node.ts:130](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L130)
---
### labelShape
`Optional` **labelShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.en.md) & [`RectStyleProps`](RectStyleProps.en.md) & [`EllipseStyleProps`](EllipseStyleProps.en.md) & [`PolygonStyleProps`](PolygonStyleProps.en.md) & [`LineStyleProps`](LineStyleProps.en.md) & [`PolylineStyleProps`](PolylineStyleProps.en.md) & [`TextStyleProps`](TextStyleProps.en.md) & [`ImageStyleProps`](ImageStyleProps.en.md) & [`PathStyleProps`](PathStyleProps.en.md) & [`SphereGeometryProps`](SphereGeometryProps.en.md) & [`CubeGeometryProps`](CubeGeometryProps.en.md) & [`PlaneGeometryProps`](PlaneGeometryProps.en.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `angle?`: `number` ; `maxWidth?`: `string` \| `number` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `position?`: `"center"` \| `"left"` \| `"right"` \| `"top"` \| `"bottom"` }
Style of the text to show on the node.
#### Defined in
[packages/g6/src/types/node.ts:100](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L100)
---
### otherShapes
`Optional` **otherShapes**: `Object`
#### Index signature
▪ [shapeId: `string`]: [`ShapeStyle`](../../modules/item.en.md#shapestyle)
#### Inherited from
ItemShapeStyles.otherShapes
#### Defined in
[packages/g6/src/types/item.ts:166](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L166)

View File

@ -1,149 +0,0 @@
---
title: NodeShapeStyles
---
> 📋 中文文档还在翻译中... 欢迎 PR
[Overview - v5.0.0-beta.21](../../README.zh.md) / [Modules](../../modules.zh.md) / [item](../../modules/item.zh.md) / NodeShapeStyles
[item](../../modules/item.zh.md).NodeShapeStyles
## Hierarchy
- `ItemShapeStyles`
**`NodeShapeStyles`**
## Properties
### anchorShapes
`Optional` **anchorShapes**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `[key: number]`: [`ShapeStyle`](../../modules/item.zh.md#shapestyle) & { `color?`: `string` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `position?`: [`BadgePosition`](../../enums/item/BadgePosition.zh.md) ; `size?`: `number` ; `textColor?`: `string` }; `color?`: `string` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `size?`: `number` ; `textColor?`: `string` }
#### Defined in
[packages/g6/src/types/node.ts:156](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L156)
---
### animates
`Optional` **animates**: `IAnimates`
#### Inherited from
ItemShapeStyles.animates
#### Defined in
[packages/g6/src/types/item.ts:169](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L169)
---
### badgeShapes
`Optional` **badgeShapes**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `[key: number]`: [`ShapeStyle`](../../modules/item.zh.md#shapestyle) & { `color?`: `string` ; `position?`: [`IBadgePosition`](../../modules/item.zh.md#ibadgeposition) ; `textColor?`: `string` }; `color?`: `string` ; `palette?`: `string`[] ; `textColor?`: `string` }
Style of the badges to show on the node.
#### Defined in
[packages/g6/src/types/node.ts:136](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L136)
---
### group
`Optional` **group**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.group
#### Defined in
[packages/g6/src/types/item.ts:165](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L165)
---
### haloShape
`Optional` **haloShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.haloShape
#### Defined in
[packages/g6/src/types/item.ts:164](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L164)
---
### iconShape
`Optional` **iconShape**: `Partial`<[`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `lod?`: `number` ; `offsetX?`: `number` ; `offsetY?`: `number` }\>
#### Inherited from
ItemShapeStyles.iconShape
#### Defined in
[packages/g6/src/types/item.ts:155](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L155)
---
### keyShape
`Optional` **keyShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\>
#### Inherited from
ItemShapeStyles.keyShape
#### Defined in
[packages/g6/src/types/item.ts:154](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L154)
---
### labelBackgroundShape
`Optional` **labelBackgroundShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `padding?`: `number` \| `number`[] }
The background style of the label
#### Defined in
[packages/g6/src/types/node.ts:130](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L130)
---
### labelShape
`Optional` **labelShape**: `Partial`<[`CircleStyleProps`](CircleStyleProps.zh.md) & [`RectStyleProps`](RectStyleProps.zh.md) & [`EllipseStyleProps`](EllipseStyleProps.zh.md) & [`PolygonStyleProps`](PolygonStyleProps.zh.md) & [`LineStyleProps`](LineStyleProps.zh.md) & [`PolylineStyleProps`](PolylineStyleProps.zh.md) & [`TextStyleProps`](TextStyleProps.zh.md) & [`ImageStyleProps`](ImageStyleProps.zh.md) & [`PathStyleProps`](PathStyleProps.zh.md) & [`SphereGeometryProps`](SphereGeometryProps.zh.md) & [`CubeGeometryProps`](CubeGeometryProps.zh.md) & [`PlaneGeometryProps`](PlaneGeometryProps.zh.md) & { `interactive?`: `boolean` } & { `animates?`: `IAnimates` ; `lod?`: `number` ; `visible?`: `boolean` }\> & { `angle?`: `number` ; `maxWidth?`: `string` \| `number` ; `offsetX?`: `number` ; `offsetY?`: `number` ; `offsetZ?`: `number` ; `position?`: `"center"` \| `"left"` \| `"right"` \| `"top"` \| `"bottom"` }
Style of the text to show on the node.
#### Defined in
[packages/g6/src/types/node.ts:100](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/node.ts#L100)
---
### otherShapes
`Optional` **otherShapes**: `Object`
#### Index signature
▪ [shapeId: `string`]: [`ShapeStyle`](../../modules/item.zh.md#shapestyle)
#### Inherited from
ItemShapeStyles.otherShapes
#### Defined in
[packages/g6/src/types/item.ts:166](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/types/item.ts#L166)

View File

@ -48,11 +48,11 @@ Update the state style configuration for nodes/edges/combos and re-render the it
**Parameters**: **Parameters**:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :--------------------------------------------------------------------------------------------------------------- | | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :--------------------------------------------------------------------------------------------------------------- |
| `itemType` | `ITEM_TYPE` | `undefined` | The type of items to update | | `itemType` | `ITEM_TYPE` | `undefined` | The type of items to update |
| `stateConfig` | { `[stateName: string]`: (`data`: [`NodeInnerModel`](../data/NodeInnerModel.en.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.en.md) \| `NodeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.en.md) \| `EdgeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md) \| `ComboShapesEncode`; } | `undefined` | The updated state style configuration | | `stateConfig` | { `[stateName: string]`: (`data`: [`NodeModel`](../data/NodeModel.en.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.en.md) \| `NodeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`EdgeModel`](../data/EdgeModel.en.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.en.md) \| `EdgeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`ComboModel`](../data/ComboModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md) \| `ComboShapesEncode`; } | `undefined` | The updated state style configuration |
| `updateType` | `"replace"` \| `"mergeReplace"` | `'mergeReplace'` | `'replace'` means replacing directly, `'mergeReplace'` means merging with the original mapper and then replacing | | `updateType` | `"replace"` \| `"mergeReplace"` | `'mergeReplace'` | `'replace'` means replacing directly, `'mergeReplace'` means merging with the original mapper and then replacing |
## Data ## Data
@ -121,7 +121,7 @@ Update partial data of a specific type.
**Returns**: Updated data **Returns**: Updated data
[`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md) \| [`NodeInnerModel`](../data/NodeInnerModel.en.md)[] \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)[] \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)[] [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md) \| [`NodeModel`](../data/NodeModel.en.md)[] \| [`EdgeModel`](../data/EdgeModel.en.md)[] \| [`ComboModel`](../data/ComboModel.en.md)[]
### removeData ### removeData
@ -139,25 +139,25 @@ Remove one or more items of the same type.
Get all node data (inner model). Get all node data (inner model).
**Type**: () => [`NodeInnerModel`](../data/NodeInnerModel.en.md)[] **Type**: () => [`NodeModel`](../data/NodeModel.en.md)[]
### getAllEdgesData ### getAllEdgesData
Get all edge data (inner model). Get all edge data (inner model).
**Type**: () => [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)[] **Type**: () => [`EdgeModel`](../data/EdgeModel.en.md)[]
### getAllCombosData ### getAllCombosData
Get all combo data (inner model). Get all combo data (inner model).
**Type**: () => [`ComboInnerModel`](../data/ComboInnerModel.en.md)[] **Type**: () => [`ComboModel`](../data/ComboModel.en.md)[]
### getNodeData ### getNodeData
Get node data (inner model) with the specified id or condition. Get node data (inner model) with the specified id or condition.
**Type**: (`condition`: `Function` \| `ID`) => [`NodeInnerModel`](../data/NodeInnerModel.en.md) **Type**: (`condition`: `Function` \| `ID`) => [`NodeModel`](../data/NodeModel.en.md)
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -168,7 +168,7 @@ Get node data (inner model) with the specified id or condition.
Get edge data (inner model) with the specified id or condition. Get edge data (inner model) with the specified id or condition.
**Type**: (`condition`: `Function` \| `ID`) => [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) **Type**: (`condition`: `Function` \| `ID`) => [`EdgeModel`](../data/EdgeModel.en.md)
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -179,7 +179,7 @@ Get edge data (inner model) with the specified id or condition.
Get combo data (inner model) with the specified id or condition. Get combo data (inner model) with the specified id or condition.
**Type**: (`condition`: `Function` \| `ID`) => [`ComboInnerModel`](../data/ComboInnerModel.en.md) **Type**: (`condition`: `Function` \| `ID`) => [`ComboModel`](../data/ComboModel.en.md)
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -190,7 +190,7 @@ Get combo data (inner model) with the specified id or condition.
Get the one-hop neighbor node data (inner model) of the specified node. Get the one-hop neighbor node data (inner model) of the specified node.
**Type**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`NodeInnerModel`](../data/NodeInnerModel.en.md)[] **Type**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`NodeModel`](../data/NodeModel.en.md)[]
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -204,7 +204,7 @@ Get the one-hop neighbor node data (inner model) of the specified node.
Get the one-hop neighbor edge data (inner model) of the specified node. Get the one-hop neighbor edge data (inner model) of the specified node.
**Type**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)[] **Type**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`EdgeModel`](../data/EdgeModel.en.md)[]
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -218,7 +218,7 @@ Get the one-hop neighbor edge data (inner model) of the specified node.
Get the edge data (inner model) related to the specified node. Get the edge data (inner model) related to the specified node.
**Type**: (`nodeId`: `ID`) => [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)[] **Type**: (`nodeId`: `ID`) => [`EdgeModel`](../data/EdgeModel.en.md)[]
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
@ -244,7 +244,7 @@ Update the position of a single or multiple nodes. This API does not update othe
| `models` | `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\> | The configuration options for updating, each data contains the node id and data, including x and y information | | `models` | `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\> | The configuration options for updating, each data contains the node id and data, including x and y information |
| `upsertAncestors?` | `boolean` | Whether to update ancestor combo at the same time | | `upsertAncestors?` | `boolean` | Whether to update ancestor combo at the same time |
| `disableAnimate?` | `boolean` | Whether to disable animation | | `disableAnimate?` | `boolean` | Whether to disable animation |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md), `canceled?`: `boolean`) => `void` | Callback function after the position update is complete. The rendering of position update may be asynchronous, and this callback can be used for post-update logic | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md), `canceled?`: `boolean`) => `void` | Callback function after the position update is complete. The rendering of position update may be asynchronous, and this callback can be used for post-update logic |
### clear ### clear
@ -271,16 +271,16 @@ Switch the renderer at runtime.
Get a list of item IDs with the specified state and type. Get a list of item IDs with the specified state and type.
**Type**: (`itemType`: `ITEM_TYPE`, `state`: `string`, `value?`: `string` \| `boolean`, `additionalFilter?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => `boolean`) => `ID`[] **Type**: (`itemType`: `ITEM_TYPE`, `state`: `string`, `value?`: `string` \| `boolean`, `additionalFilter?`: (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md)) => `boolean`) => `ID`[]
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
| :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------- | | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------- |
| `itemType` | `ITEM_TYPE` | The type of the item | | `itemType` | `ITEM_TYPE` | The type of the item |
| `state` | `string` | The name of the state | | `state` | `string` | The name of the state |
| `value?` | `string` \| `boolean` | The value of the state, defaults to `true` | | `value?` | `string` \| `boolean` | The value of the state, defaults to `true` |
| `additionalFilter?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => `boolean` | Additional filter, parameter is data that satisfies the state (inner model) | | `additionalFilter?` | (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md)) => `boolean` | Additional filter, parameter is data that satisfies the state (inner model) |
**Returns**: `ID`[], a list of item IDs that meet the conditions. **Returns**: `ID`[], a list of item IDs that meet the conditions.
@ -408,7 +408,7 @@ Move the specified single or multiple items to the back layer. Note that the lay
Add a new combo and update the specified child nodes by moving them from the original parent combo to the new combo. Essentially, it is addData, but with some adjustments to the Combo hierarchy tree based on the added combo data. Add a new combo and update the specified child nodes by moving them from the original parent combo to the new combo. Essentially, it is addData, but with some adjustments to the Combo hierarchy tree based on the added combo data.
**Type**: (`model`: [`ComboUserModel`](../data/ComboUserModel.en.md), `childrenIds`: `ID`[]) => [`ComboInnerModel`](../data/ComboInnerModel.en.md) **Type**: (`model`: [`ComboUserModel`](../data/ComboUserModel.en.md), `childrenIds`: `ID`[]) => [`ComboModel`](../data/ComboModel.en.md)
**Parameters**: **Parameters**:
@ -417,7 +417,7 @@ Add a new combo and update the specified child nodes by moving them from the ori
| `model` | [`ComboUserModel`](../data/ComboUserModel.en.md) | Combo data (user data) | | `model` | [`ComboUserModel`](../data/ComboUserModel.en.md) | Combo data (user data) |
| `childrenIds` | `ID`[] | List of child node IDs | | `childrenIds` | `ID`[] | List of child node IDs |
**Returns**: [`ComboInnerModel`](../data/ComboInnerModel.en.md), the newly added Combo data (inner model). **Returns**: [`ComboModel`](../data/ComboModel.en.md), the newly added Combo data (inner model).
### collapseCombo ### collapseCombo
@ -447,17 +447,17 @@ Expand the specified single or multiple combos. Corresponds to [collapseCombo](#
Move a single or multiple combos by a relative distance (dx, dy). This API will not update other styles to improve the performance of updating the position. In fact, since the position of a combo is determined by the distribution and position of its internal child items, this API actually updates the position of the successor items of the specified combo to affect the combo and achieve the purpose of moving the combo, rather than directly updating the position of the combo. Move a single or multiple combos by a relative distance (dx, dy). This API will not update other styles to improve the performance of updating the position. In fact, since the position of a combo is determined by the distribution and position of its internal child items, this API actually updates the position of the successor items of the specified combo to affect the combo and achieve the purpose of moving the combo, rather than directly updating the position of the combo.
**Type**: (`ids`: `ID`[], `dx`: `number`, `dy`: `number`, `upsertAncestors?`: `boolean`, `callback?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md), `canceled?`: `boolean`) => `void`) => [`ComboInnerModel`](../data/ComboInnerModel.en.md)[] **Type**: (`ids`: `ID`[], `dx`: `number`, `dy`: `number`, `upsertAncestors?`: `boolean`, `callback?`: (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md), `canceled?`: `boolean`) => `void`) => [`ComboModel`](../data/ComboModel.en.md)[]
**Parameters**: **Parameters**:
| Name | Type | Description | | Name | Type | Description |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------- | | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------- |
| `ids` | `ID`[] | The ID or IDs of the combos to be updated | | `ids` | `ID`[] | The ID or IDs of the combos to be updated |
| `dx` | `number` | The relative distance to move on the x-axis | | `dx` | `number` | The relative distance to move on the x-axis |
| `dy` | `number` | The relative distance to move on the y-axis | | `dy` | `number` | The relative distance to move on the y-axis |
| `upsertAncestors?` | `boolean` | 是 Whether to update the ancestor combos as well | | `upsertAncestors?` | `boolean` | 是 Whether to update the ancestor combos as well |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md), `canceled?`: `boolean`) => `void` | Callback function after the update is complete | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md), `canceled?`: `boolean`) => `void` | Callback function after the update is complete |
**Returns**: `ComboModel[]`, the updated Combo data (inner model). **Returns**: `ComboModel[]`, the updated Combo data (inner model).
@ -465,7 +465,7 @@ Move a single or multiple combos by a relative distance (dx, dy). This API will
Updates the position of one or more Combos to a specified position (x, y). Similar to the corresponding API [updateNodePosition](#updatenodeposition) for nodes. Updates the position of one or more Combos to a specified position (x, y). Similar to the corresponding API [updateNodePosition](#updatenodeposition) for nodes.
**Type**: (`models`: `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\>, `upsertAncestors?`: `boolean`, `disableAnimate?`: `boolean`, `callback?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => `void`) => [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md) \| [`NodeInnerModel`](../data/NodeInnerModel.en.md)[] \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)[] **Type**: (`models`: `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\>, `upsertAncestors?`: `boolean`, `disableAnimate?`: `boolean`, `callback?`: (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md)) => `void`) => [`NodeModel`](../data/NodeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md) \| [`NodeModel`](../data/NodeModel.en.md)[] \| [`ComboModel`](../data/ComboModel.en.md)[]
**Parameters**: **Parameters**:
@ -474,15 +474,15 @@ Updates the position of one or more Combos to a specified position (x, y). Simil
| `models` | `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\> | An object with the Combo id and data to be updated, and the data contains the new `x` and `y` information | | `models` | `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.en.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.en.md)\>[]\> | An object with the Combo id and data to be updated, and the data contains the new `x` and `y` information |
| `upsertAncestors?` | `boolean` | Whether to update the ancestor Combos at the same time | | `upsertAncestors?` | `boolean` | Whether to update the ancestor Combos at the same time |
| `disableAnimate?` | `boolean` | Whether to disable animation | | `disableAnimate?` | `boolean` | Whether to disable animation |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => `void` | The callback function after the update is completed | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.en.md) \| [`EdgeModel`](../data/EdgeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md)) => `void` | The callback function after the update is completed |
**Returns**: [`ComboInnerModel`](../data/ComboInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md)[], the updated Combo data (inner model). **Returns**: [`ComboModel`](../data/ComboModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md)[], the updated Combo data (inner model).
### getComboChildrenData ### getComboChildrenData
Gets the data of the child items (nodes/combos) of a Combo (inner model). Gets the data of the child items (nodes/combos) of a Combo (inner model).
**Type**: (`comboId`: `ID`) => ([`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md))[] **Type**: (`comboId`: `ID`) => ([`NodeModel`](../data/NodeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md))[]
**Parameters**: **Parameters**:
@ -490,7 +490,7 @@ Gets the data of the child items (nodes/combos) of a Combo (inner model).
| :-------- | :------- | | :-------- | :------- |
| `comboId` | Combo id | | `comboId` | Combo id |
**Returns**: ([`NodeInnerModel`](../data/NodeInnerModel.en.md) \| [`ComboInnerModel`](../data/ComboInnerModel.en.md))[] the data of the children (inner model). **Returns**: ([`NodeModel`](../data/NodeModel.en.md) \| [`ComboModel`](../data/ComboModel.en.md))[] the data of the children (inner model).
## Layout ## Layout

View File

@ -48,11 +48,11 @@ order: 1
**参数**: **参数**:
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :---------------------------------------------------------------------- | | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :---------------------------------------------------------------------- |
| `itemType` | `ITEM_TYPE` | `undefined` | 需要更新的元素类型 | | `itemType` | `ITEM_TYPE` | `undefined` | 需要更新的元素类型 |
| `stateConfig` | { `[stateName: string]`: (`data`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.zh.md) \| `NodeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.zh.md) \| `EdgeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`ComboInnerModel`](../data/ComboInnerModel.zh.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.zh.md) \| `ComboShapesEncode`; } | `undefined` | 更新的状态样式配置 | | `stateConfig` | { `[stateName: string]`: (`data`: [`NodeModel`](../data/NodeModel.zh.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.zh.md) \| `NodeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`EdgeModel`](../data/EdgeModel.zh.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.zh.md) \| `EdgeShapesEncode`; } \| { `[stateName: string]`: (`data`: [`ComboModel`](../data/ComboModel.zh.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.zh.md) \| `ComboShapesEncode`; } | `undefined` | 更新的状态样式配置 |
| `updateType` | `"replace"` \| `"mergeReplace"` | `'mergeReplace'` | `'replace'` 表示直接替换,`'mergeReplace'` 表示融合到原 mapper 上后替换 | | `updateType` | `"replace"` \| `"mergeReplace"` | `'mergeReplace'` | `'replace'` 表示直接替换,`'mergeReplace'` 表示融合到原 mapper 上后替换 |
## 数据 ## 数据
@ -121,7 +121,7 @@ order: 1
**返回值**: 更新后的数据 **返回值**: 更新后的数据
[`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md) \| [`NodeInnerModel`](../data/NodeInnerModel.zh.md)[] \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)[] \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)[] [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md) \| [`NodeModel`](../data/NodeModel.zh.md)[] \| [`EdgeModel`](../data/EdgeModel.zh.md)[] \| [`ComboModel`](../data/ComboModel.zh.md)[]
### removeData ### removeData
@ -139,25 +139,25 @@ order: 1
获取所有的节点数据(内部流转数据)。 获取所有的节点数据(内部流转数据)。
**类型**: () => [`NodeInnerModel`](../data/NodeInnerModel.zh.md)[] **类型**: () => [`NodeModel`](../data/NodeModel.zh.md)[]
### getAllEdgesData ### getAllEdgesData
获取所有的边数据(内部流转数据)。 获取所有的边数据(内部流转数据)。
**类型**: () => [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)[] **类型**: () => [`EdgeModel`](../data/EdgeModel.zh.md)[]
### getAllCombosData ### getAllCombosData
获取所有的 Combo 数据(内部流转数据)。 获取所有的 Combo 数据(内部流转数据)。
**类型**: () => [`ComboInnerModel`](../data/ComboInnerModel.zh.md)[] **类型**: () => [`ComboModel`](../data/ComboModel.zh.md)[]
### getNodeData ### getNodeData
获得指定 id 或条件的节点数据(内部流转数据)。 获得指定 id 或条件的节点数据(内部流转数据)。
**类型**: (`condition`: `Function` \| `ID`) => [`NodeInnerModel`](../data/NodeInnerModel.zh.md) **类型**: (`condition`: `Function` \| `ID`) => [`NodeModel`](../data/NodeModel.zh.md)
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -168,7 +168,7 @@ order: 1
获得指定 id 或条件的边数据(内部流转数据)。 获得指定 id 或条件的边数据(内部流转数据)。
**类型**: (`condition`: `Function` \| `ID`) => [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) **类型**: (`condition`: `Function` \| `ID`) => [`EdgeModel`](../data/EdgeModel.zh.md)
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -179,7 +179,7 @@ order: 1
获得指定 id 或条件的边数据(内部流转数据)。 获得指定 id 或条件的边数据(内部流转数据)。
**类型**: (`condition`: `Function` \| `ID`) => [`ComboInnerModel`](../data/ComboInnerModel.zh.md) **类型**: (`condition`: `Function` \| `ID`) => [`ComboModel`](../data/ComboModel.zh.md)
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -190,7 +190,7 @@ order: 1
获取指定节点的一跳邻居节点数据(内部流转数据)。 获取指定节点的一跳邻居节点数据(内部流转数据)。
**类型**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`NodeInnerModel`](../data/NodeInnerModel.zh.md)[] **类型**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`NodeModel`](../data/NodeModel.zh.md)[]
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -204,7 +204,7 @@ order: 1
获取指定节点相关的边数据(内部流转数据)。 获取指定节点相关的边数据(内部流转数据)。
**类型**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)[] **类型**: (`nodeId`: `ID`, `direction?`: `"both"` \| `"in"` \| `"out"`) => [`EdgeModel`](../data/EdgeModel.zh.md)[]
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -218,7 +218,7 @@ order: 1
使用四叉树检测获取指定节点周围的相关边。 使用四叉树检测获取指定节点周围的相关边。
**类型**: (`nodeId`: `ID`) => [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)[] **类型**: (`nodeId`: `ID`) => [`EdgeModel`](../data/EdgeModel.zh.md)[]
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
@ -244,7 +244,7 @@ order: 1
| `models` | `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\> | 更新的配置项,每条数据包含节点 id 和 datadata 中包括 x y 信息 | | `models` | `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\> | 更新的配置项,每条数据包含节点 id 和 datadata 中包括 x y 信息 |
| `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo | | `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo |
| `disableAnimate?` | `boolean` | 是否禁用动画 | | `disableAnimate?` | `boolean` | 是否禁用动画 |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md), `canceled?`: `boolean`) => `void` | 位置更新完成后的回调函数。位置更新的渲染可能是异步的,可通过该回调进行更新完成后的逻辑 | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md), `canceled?`: `boolean`) => `void` | 位置更新完成后的回调函数。位置更新的渲染可能是异步的,可通过该回调进行更新完成后的逻辑 |
### clear ### clear
@ -271,16 +271,16 @@ order: 1
获取指定状态和类型的元素 id 列表。 获取指定状态和类型的元素 id 列表。
**类型**: (`itemType`: `ITEM_TYPE`, `state`: `string`, `value?`: `string` \| `boolean`, `additionalFilter?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)) => `boolean`) => `ID`[] **类型**: (`itemType`: `ITEM_TYPE`, `state`: `string`, `value?`: `string` \| `boolean`, `additionalFilter?`: (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md)) => `boolean`) => `ID`[]
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
| :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- | | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- |
| `itemType` | `ITEM_TYPE` | 元素类型 | | `itemType` | `ITEM_TYPE` | 元素类型 |
| `state` | `string` | 状态名称 | | `state` | `string` | 状态名称 |
| `value?` | `string` \| `boolean` | 状态值,默认为 `true` | | `value?` | `string` \| `boolean` | 状态值,默认为 `true` |
| `additionalFilter?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)) => `boolean` | 额外的筛选器,入参为满足状态的数据(内部流转数据) | | `additionalFilter?` | (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md)) => `boolean` | 额外的筛选器,入参为满足状态的数据(内部流转数据) |
**返回值**: `ID`[],满足条件的元素的 id 列表。 **返回值**: `ID`[],满足条件的元素的 id 列表。
@ -408,7 +408,7 @@ order: 1
新增 combo同时更新指定的子节点从原父 combo 中移动到新 combo 中。本质上是 addData但在增加 combo 数据的基础上做一些 Combo 层级嵌套树的调整。 新增 combo同时更新指定的子节点从原父 combo 中移动到新 combo 中。本质上是 addData但在增加 combo 数据的基础上做一些 Combo 层级嵌套树的调整。
**类型**: (`model`: [`ComboUserModel`](../data/ComboUserModel.zh.md), `childrenIds`: `ID`[]) => [`ComboInnerModel`](../data/ComboInnerModel.zh.md) **类型**: (`model`: [`ComboUserModel`](../data/ComboUserModel.zh.md), `childrenIds`: `ID`[]) => [`ComboModel`](../data/ComboModel.zh.md)
**参数**: **参数**:
@ -417,7 +417,7 @@ order: 1
| `model` | [`ComboUserModel`](../data/ComboUserModel.zh.md) | Combo 数据(用户数据) | | `model` | [`ComboUserModel`](../data/ComboUserModel.zh.md) | Combo 数据(用户数据) |
| `childrenIds` | `ID`[] | 子节点 id 列表 | | `childrenIds` | `ID`[] | 子节点 id 列表 |
**返回值**: [`ComboInnerModel`](../data/ComboInnerModel.zh.md),新增的 Combo 数据(内部流转数据)。 **返回值**: [`ComboModel`](../data/ComboModel.zh.md),新增的 Combo 数据(内部流转数据)。
### collapseCombo ### collapseCombo
@ -447,17 +447,17 @@ order: 1
移动单个/多个 Combo 一个相对的距离dxdy。该 API 将不更新其他样式以提升更新位置的性能。事实上,由于 Combo 的位置取决的内部子元素的分布和位置,因此该 API 实际上是在更新指定 Combo 的后继元素的位置,以影响该 Combo 以达到移动该 Combo 的目的,而不是直接更新该 Combo 的位置。 移动单个/多个 Combo 一个相对的距离dxdy。该 API 将不更新其他样式以提升更新位置的性能。事实上,由于 Combo 的位置取决的内部子元素的分布和位置,因此该 API 实际上是在更新指定 Combo 的后继元素的位置,以影响该 Combo 以达到移动该 Combo 的目的,而不是直接更新该 Combo 的位置。
**类型**: (`ids`: `ID`[], `dx`: `number`, `dy`: `number`, `upsertAncestors?`: `boolean`, `callback?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md), `canceled?`: `boolean`) => `void`) => [`ComboInnerModel`](../data/ComboInnerModel.zh.md)[] **类型**: (`ids`: `ID`[], `dx`: `number`, `dy`: `number`, `upsertAncestors?`: `boolean`, `callback?`: (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md), `canceled?`: `boolean`) => `void`) => [`ComboModel`](../data/ComboModel.zh.md)[]
**参数**: **参数**:
| Name | Type | Description | | Name | Type | Description |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------- | | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------- |
| `ids` | `ID`[] | 需要被更新的 Combo id | | `ids` | `ID`[] | 需要被更新的 Combo id |
| `dx` | `number` | 移动的 x 轴相对距离 | | `dx` | `number` | 移动的 x 轴相对距离 |
| `dy` | `number` | 移动的 y 轴相对距离 | | `dy` | `number` | 移动的 y 轴相对距离 |
| `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo | | `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md), `canceled?`: `boolean`) => `void` | 更新完成后的回调函数 | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md), `canceled?`: `boolean`) => `void` | 更新完成后的回调函数 |
**返回值**: `ComboModel[]`,更新后的 Combo 数据(内部流转数据)。 **返回值**: `ComboModel[]`,更新后的 Combo 数据(内部流转数据)。
@ -465,7 +465,7 @@ order: 1
更新单个或多个 Combo 的位置到指定位置xy上。类似节点的对应 API [updateNodePosition](#updatenodeposition)。 更新单个或多个 Combo 的位置到指定位置xy上。类似节点的对应 API [updateNodePosition](#updatenodeposition)。
**类型**: (`models`: `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\>, `upsertAncestors?`: `boolean`, `disableAnimate?`: `boolean`, `callback?`: (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)) => `void`) => [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md) \| [`NodeInnerModel`](../data/NodeInnerModel.zh.md)[] \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)[] **类型**: (`models`: `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\>, `upsertAncestors?`: `boolean`, `disableAnimate?`: `boolean`, `callback?`: (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md)) => `void`) => [`NodeModel`](../data/NodeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md) \| [`NodeModel`](../data/NodeModel.zh.md)[] \| [`ComboModel`](../data/ComboModel.zh.md)[]
**参数**: **参数**:
@ -474,15 +474,15 @@ order: 1
| `models` | `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\> | 每条数据带有需要更新的 Combo id 以及 datadata 中包含新的 `x` `y` 信息 | | `models` | `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\> \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md) \| `Partial`<[`NodeUserModel`](../data/NodeUserModel.zh.md)\>[] \| `Partial`<[`ComboUserModel`](../data/ComboUserModel.zh.md)\>[]\> | 每条数据带有需要更新的 Combo id 以及 datadata 中包含新的 `x` `y` 信息 |
| `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo | | `upsertAncestors?` | `boolean` | 是否同时更新祖先 Combo |
| `disableAnimate?` | `boolean` | 是否禁用动画 | | `disableAnimate?` | `boolean` | 是否禁用动画 |
| `callback?` | (`model`: [`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)) => `void` | 更新完成的回调函数 | | `callback?` | (`model`: [`NodeModel`](../data/NodeModel.zh.md) \| [`EdgeModel`](../data/EdgeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md)) => `void` | 更新完成的回调函数 |
**返回值**: [`ComboInnerModel`](../data/ComboInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md)[],更新后的 Combo 数据(内部流转数据)。 **返回值**: [`ComboModel`](../data/ComboModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md)[],更新后的 Combo 数据(内部流转数据)。
### getComboChildrenData ### getComboChildrenData
获取 Combo 子元素(节点/ Combo数据内部流转数据 获取 Combo 子元素(节点/ Combo数据内部流转数据
**类型**: (`comboId`: `ID`) => ([`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md))[] **类型**: (`comboId`: `ID`) => ([`NodeModel`](../data/NodeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md))[]
**参数**: **参数**:
@ -490,7 +490,7 @@ order: 1
| :-------- | :------- | | :-------- | :------- |
| `comboId` | Combo id | | `comboId` | Combo id |
**返回值**: ([`NodeInnerModel`](../data/NodeInnerModel.zh.md) \| [`ComboInnerModel`](../data/ComboInnerModel.zh.md))[],子元素数据(内部流转数据)。 **返回值**: ([`NodeModel`](../data/NodeModel.zh.md) \| [`ComboModel`](../data/ComboModel.zh.md))[],子元素数据(内部流转数据)。
## 布局 ## 布局

View File

@ -97,7 +97,7 @@ Node mapper, can be a JSON configuration or a function. The result of the mapper
**Required**: False **Required**: False
**Type**: `NodeEncode` \| (`data`: [`NodeInnerModel`](../data/NodeInnerModel.en.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.en.md) **Type**: `NodeEncode` \| (`data`: [`NodeModel`](../data/NodeModel.en.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.en.md)
## edge ## edge
@ -105,7 +105,7 @@ Edge mapper, can be a JSON configuration or a function. The result of the mapper
**Required**: False **Required**: False
**Type**: `EdgeEncode` \| (`data`: [`EdgeInnerModel`](../data/EdgeInnerModel.en.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.en.md) **Type**: `EdgeEncode` \| (`data`: [`EdgeModel`](../data/EdgeModel.en.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.en.md)
## combo ## combo
@ -113,7 +113,7 @@ Combo mapper, can be a JSON configuration or a function. The result of the mappe
**Required**: False **Required**: False
**Type**: `ComboEncode` \| (`data`: [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md) **Type**: `ComboEncode` \| (`data`: [`ComboModel`](../data/ComboModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md)
## nodeState ## nodeState

View File

@ -97,7 +97,7 @@ string[]
**是否必须**: 否 **是否必须**: 否
**类型**: `NodeEncode` \| (`data`: [`NodeInnerModel`](../data//NodeInnerModel.zh.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.zh.md) **类型**: `NodeEncode` \| (`data`: [`NodeModel`](../data//NodeModel.zh.md)) => [`NodeDisplayModel`](../data/NodeDisplayModel.zh.md)
## edge ## edge
@ -105,7 +105,7 @@ string[]
**是否必须**: 否 **是否必须**: 否
**类型**: `EdgeEncode` \| (`data`: [`EdgeInnerModel`](../data/EdgeInnerModel.zh.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.zh.md) **类型**: `EdgeEncode` \| (`data`: [`EdgeModel`](../data/EdgeModel.zh.md)) => [`EdgeDisplayModel`](../data/EdgeDisplayModel.zh.md)
## combo ## combo
@ -113,7 +113,7 @@ Combo 映射器mapper可以是 JSON 配置,也可以函数映射。
**是否必须**: 否 **是否必须**: 否
**类型**: `ComboEncode` \| (`data`: [`ComboInnerModel`](../data/ComboInnerModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md) **类型**: `ComboEncode` \| (`data`: [`ComboModel`](../data/ComboModel.en.md)) => [`ComboDisplayModel`](../data/ComboDisplayModel.en.md)
## nodeState ## nodeState

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -110,16 +110,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `Object` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `Object` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -147,16 +147,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -178,16 +178,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -240,16 +240,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -272,16 +272,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -303,16 +303,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -334,16 +334,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -365,16 +365,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -106,16 +106,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `Object` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `Object` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -147,16 +147,16 @@ An object containing the keyShape and optional labelShape, iconShape, and some o
#### Parameters #### Parameters
| Name | Type | | Name | Type |
| :------------------- | :------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | | `model` | `NodeDisplayModel` |
| `shapeMap` | `NodeShapeMap` | | `shapeMap` | `NodeShapeMap` |
| `diffData?` | `Object` | | `diffData?` | `Object` |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) |
| `diffState?` | `Object` | | `diffState?` | `Object` |
| `diffState.current` | `State`[] | | `diffState.current` | `State`[] |
| `diffState.previous` | `State`[] | | `diffState.previous` | `State`[] |
#### Returns #### Returns
@ -180,16 +180,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -215,16 +215,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -250,16 +250,16 @@ Draw the icon shape of the 3D node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :------------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :------------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current 3D node's state. | | `diffState?` | `Object` | An object that contains previous and current 3D node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -286,16 +286,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -321,16 +321,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -356,16 +356,16 @@ Draw the label shape of the 3D node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :------------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :------------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current 3D node's state. | | `diffState?` | `Object` | An object that contains previous and current 3D node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -391,16 +391,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `DonutNodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `DonutNodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `DonutNodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `DonutNodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ An object containing the keyShape and optional labelShape, iconShape, and some o
#### Parameters #### Parameters
| Name | Type | | Name | Type |
| :------------------- | :------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | | `model` | `NodeDisplayModel` |
| `shapeMap` | `NodeShapeMap` | | `shapeMap` | `NodeShapeMap` |
| `diffData?` | `Object` | | `diffData?` | `Object` |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) |
| `diffState?` | `Object` | | `diffState?` | `Object` |
| `diffState.current` | `State`[] | | `diffState.current` | `State`[] |
| `diffState.previous` | `State`[] | | `diffState.previous` | `State`[] |
#### Returns #### Returns
@ -172,16 +172,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -207,16 +207,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -242,16 +242,16 @@ Draw the icon shape of the 3D node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :------------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :------------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current 3D node's state. | | `diffState?` | `Object` | An object that contains previous and current 3D node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -278,16 +278,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -313,16 +313,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -348,16 +348,16 @@ Draw the label shape of the 3D node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :------------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :------------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this 3D node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the 3D node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current 3D node's state. | | `diffState?` | `Object` | An object that contains previous and current 3D node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -383,16 +383,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ Draw the icon shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -280,16 +280,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -315,16 +315,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -350,16 +350,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -385,16 +385,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -104,16 +104,16 @@ You should call `drawKeyShape` and `drawAnchorShape`,`drawLabelShape`,`drawIconS
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -139,16 +139,16 @@ Draw the anchors shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -174,16 +174,16 @@ Draw the badges shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -209,16 +209,16 @@ Draw the halo shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -244,16 +244,16 @@ The display object representing the halo shape of the node.
#### Parameters #### Parameters
| Name | Type | | Name | Type |
| :------------------- | :--------------------------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` |
| `shapeMap` | `NodeShapeMap` | | `shapeMap` | `NodeShapeMap` |
| `diffData?` | `Object` | | `diffData?` | `Object` |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` |
| `diffState?` | `Object` | | `diffState?` | `Object` |
| `diffState.current` | `State`[] | | `diffState.current` | `State`[] |
| `diffState.previous` | `State`[] | | `diffState.previous` | `State`[] |
#### Returns #### Returns
@ -278,16 +278,16 @@ Draw the key shape of the node based on the provided model and shape map.
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -313,16 +313,16 @@ Draw the label background shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.newState` | `State`[] | - | | `diffState.newState` | `State`[] | - |
| `diffState.oldState` | `State`[] | - | | `diffState.oldState` | `State`[] | - |
#### Returns #### Returns
@ -348,16 +348,16 @@ Draw the label shape of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns
@ -383,16 +383,16 @@ Draw other shapes(such as preRect,stateIcon) of the node
#### Parameters #### Parameters
| Name | Type | Description | | Name | Type | Description |
| :------------------- | :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | | :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. | | `model` | `NodeDisplayModel` \| `ComboDisplayModel` | The displayed model of this node, only for drawing and not received by users. |
| `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. | | `shapeMap` | `NodeShapeMap` | The shape map that contains all of the elements to show on the node. |
| `diffData?` | `Object` | An object that contains previous and current data. | | `diffData?` | `Object` | An object that contains previous and current data. |
| `diffData.current` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.current` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffData.previous` | [`NodeUserModelData`](../data/NodeInnerModel.zh.md#nodeinnermodeldatatype) \| `ComboModelData` | - | | `diffData.previous` | [`NodeUserModelData`](../data/NodeModel.zh.md#nodemodeldatatype) \| `ComboModelData` | - |
| `diffState?` | `Object` | An object that contains previous and current node's state. | | `diffState?` | `Object` | An object that contains previous and current node's state. |
| `diffState.current` | `State`[] | - | | `diffState.current` | `State`[] | - |
| `diffState.previous` | `State`[] | - | | `diffState.previous` | `State`[] | - |
#### Returns #### Returns

View File

@ -31,7 +31,7 @@ This document showcases all the configuration options for the Combo combined lay
outerLayout: new G6.Extensions.ForceLayout({ outerLayout: new G6.Extensions.ForceLayout({
gravity: 1, gravity: 1,
factor: 2, factor: 2,
linkDistance: (edge: EdgeInnerModel, source: NodeInnerModel, target: NodeInnerModel) => { linkDistance: (edge: EdgeModel, source: NodeModel, target: NodeModel) => {
const nodeSize = ((source.data.size?.[0] || 30) + (target.data.size?.[0] || 30)) / 2; const nodeSize = ((source.data.size?.[0] || 30) + (target.data.size?.[0] || 30)) / 2;
return Math.min(nodeSize * 1.5, 700); return Math.min(nodeSize * 1.5, 700);
}, },
@ -56,7 +56,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## comboPadding ## comboPadding
**Type**: `number` \| (`comboModel`: `ComboInnerModel`) => `number` **Type**: `number` \| (`comboModel`: `ComboModel`) => `number`
**Default**: `10` **Default**: `10`
@ -76,7 +76,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `10` **Default**: `10`
@ -86,7 +86,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## spacing ## spacing
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `0` **Default**: `0`
@ -97,7 +97,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
**示例** **示例**
```typescript ```typescript
(nodeModel: NodeInnerModel) => { (nodeModel: NodeModel) => {
// nodeModel is a node's inner model // nodeModel is a node's inner model
if (nodeModel.id === 'node1') { if (nodeModel.id === 'node1') {
return 100; return 100;

View File

@ -31,7 +31,7 @@ order: 3
outerLayout: new G6.Extensions.ForceLayout({ outerLayout: new G6.Extensions.ForceLayout({
gravity: 1, gravity: 1,
factor: 2, factor: 2,
linkDistance: (edge: EdgeInnerModel, source: NodeInnerModel, target: NodeInnerModel) => { linkDistance: (edge: EdgeModel, source: NodeModel, target: NodeModel) => {
const nodeSize = ((source.data.size?.[0] || 30) + (target.data.size?.[0] || 30)) / 2; const nodeSize = ((source.data.size?.[0] || 30) + (target.data.size?.[0] || 30)) / 2;
return Math.min(nodeSize * 1.5, 700); return Math.min(nodeSize * 1.5, 700);
}, },
@ -57,7 +57,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## comboPadding ## comboPadding
**类型**`number` \| (`comboModel`: `ComboInnerModel`) => `number` **类型**`number` \| (`comboModel`: `ComboModel`) => `number`
**默认值**`10` **默认值**`10`
@ -77,7 +77,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`10` **默认值**`10`
@ -87,7 +87,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
## spacing ## spacing
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`0` **默认值**`0`
@ -98,7 +98,7 @@ innerLayout: new G6.Extensions.ConcentricLayout({
**Example**: **Example**:
```typescript ```typescript
(nodeModel: NodeInnerModel) => { (nodeModel: NodeModel) => {
// d is a node's inner model // d is a node's inner model
if (nodeModel.id === 'node1') { if (nodeModel.id === 'node1') {
return 100; return 100;

View File

@ -49,7 +49,7 @@ This document showcases all the configuration options for concentric layout. [Co
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `undefined` **Default**: `undefined`
@ -59,7 +59,7 @@ This document showcases all the configuration options for concentric layout. [Co
## nodeSpacing ## nodeSpacing
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `10` **Default**: `10`

View File

@ -49,7 +49,7 @@ order: 8
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`undefined` **默认值**`undefined`
@ -59,7 +59,7 @@ order: 8
## nodeSpacing ## nodeSpacing
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`10` **默认值**`10`

View File

@ -47,7 +47,7 @@ This document showcases all the configuration options for D3 Force layout.
## linkDistance ## linkDistance
**Type**: `number` \| (`model`: `EdgeInnerModel`) => `number` **Type**: `number` \| (`model`: `EdgeModel`) => `number`
**Default**: `50` **Default**: `50`
@ -99,7 +99,7 @@ This document showcases all the configuration options for D3 Force layout.
## edgeStrength ## edgeStrength
**Type**: `number` \| (`model`: `EdgeInnerModel`) => `number` **Type**: `number` \| (`model`: `EdgeModel`) => `number`
**Default**: `null` **Default**: `null`

View File

@ -47,7 +47,7 @@ order: 11
## linkDistance ## linkDistance
**类型**`number` \| (`model`: `EdgeInnerModel`) => `number` **类型**`number` \| (`model`: `EdgeModel`) => `number`
**默认值**`50` **默认值**`50`
@ -99,7 +99,7 @@ order: 11
## edgeStrength ## edgeStrength
**类型**`number` \| (`model`: `EdgeInnerModel`) => `number` **类型**`number` \| (`model`: `EdgeModel`) => `number`
**默认值**`null` **默认值**`null`

View File

@ -55,7 +55,7 @@ You can specify the layer of nodes by configuring the `data.layer` field in the
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: Takes the `data.size` value from the node model by default, or uses `10` if it is not available. **Default**: Takes the `data.size` value from the node model by default, or uses `10` if it is not available.
@ -75,7 +75,7 @@ You can specify the layer of nodes by configuring the `data.layer` field in the
## nodesepFunc ## nodesepFunc
**Type**: (`nodeModel`: `NodeInnerModel`) => `number` **Type**: (`nodeModel`: `NodeModel`) => `number`
**Default**: undefined **Default**: undefined
@ -105,7 +105,7 @@ You can specify the layer of nodes by configuring the `data.layer` field in the
## ranksepFunc ## ranksepFunc
**Type**: (`nodeModel`: `NodeInnerModel`) => `number` **Type**: (`nodeModel`: `NodeModel`) => `number`
**Default**: `undefined` **Default**: `undefined`

View File

@ -55,7 +55,7 @@ order: 2
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**:默认取节点中的 `data.size` 值,若无此值则使用 `10` **默认值**:默认取节点中的 `data.size` 值,若无此值则使用 `10`
@ -75,7 +75,7 @@ order: 2
## nodesepFunc ## nodesepFunc
**类型**(`nodeModel`: `NodeInnerModel`) => `number` **类型**(`nodeModel`: `NodeModel`) => `number`
**默认值**undefined **默认值**undefined
@ -105,7 +105,7 @@ order: 2
## ranksepFunc ## ranksepFunc
**类型**(`nodeModel`: `NodeInnerModel`) => `number` **类型**(`nodeModel`: `NodeModel`) => `number`
**默认值**`undefined` **默认值**`undefined`

View File

@ -79,7 +79,7 @@ This article showcases all the configuration options for the ForceAtlas2 force-d
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `undefined` **Default**: `undefined`

View File

@ -79,7 +79,7 @@ order: 9
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`undefined` **默认值**`undefined`

View File

@ -50,7 +50,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## getCenter ## getCenter
**Type**: (`model`: `NodeInnerModel`) => `number` **Type**: (`model`: `NodeModel`) => `number`
**Default**: `undefined` **Default**: `undefined`
@ -81,7 +81,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**Default**: Read the `data.size` from the node model. If not available, the default value is `10`. **Default**: Read the `data.size` from the node model. If not available, the default value is `10`.
@ -91,7 +91,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## nodeSpacing ## nodeSpacing
**Type**: `number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**Default**: `10` **Default**: `10`
@ -101,7 +101,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## linkDistance ## linkDistance
**Type**: `number` \| (`model`: `EdgeInnerModel`) => `number` **Type**: `number` \| (`model`: `EdgeModel`) => `number`
**Default**: `200` **Default**: `200`
@ -111,7 +111,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## nodeStrength ## nodeStrength
**Type**: `number` \| (`model`: `NodeInnerModel`) => `number` **Type**: `number` \| (`model`: `NodeModel`) => `number`
**Default**: `1000` **Default**: `1000`
@ -121,7 +121,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## edgeStrength ## edgeStrength
**Type**: `number` \| (`model`: `EdgeInnerModel`) => `number` **Type**: `number` \| (`model`: `EdgeModel`) => `number`
**Default**: `200` **Default**: `200`
@ -161,7 +161,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## getMass ## getMass
**Type**: (`model`: `NodeInnerModel`) => `number` **Type**: (`model`: `NodeModel`) => `number`
**Default**: In G6, the mass of existing nodes in incremental layout will be increased to maintain the stability of existing content. For other cases, the mass of the node is `1` **Default**: In G6, the mass of existing nodes in incremental layout will be increased to maintain the stability of existing content. For other cases, the mass of the node is `1`
@ -229,12 +229,12 @@ This document shows all the options for force-directed layout. [Force-Directed L
**Description**: Centripetal force configuration, including the centripetal center and the strength of the centripetal force for leaf nodes, discrete nodes, and other nodes **Description**: Centripetal force configuration, including the centripetal center and the strength of the centripetal force for leaf nodes, discrete nodes, and other nodes
| Parameter | Type | Example | Default | Description | | Parameter | Type | Example | Default | Description |
| --------- | -------------------------------------------------------- | ------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------- | | --------- | --------------------------------------------------- | ------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------- |
| single | `number` \ (`model`: `NodeInnerModel`) => `number` | 2 | 2, | the center force strength for discrete nodes (with 0 degree) | | single | `number` \ (`model`: `NodeModel`) => `number` | 2 | 2, | the center force strength for discrete nodes (with 0 degree) |
| leaf | `number` \ (`model`: `NodeInnerModel`) => `number` | 2 | 2 | the center force strength for leaf nodes (with 1 degree) | | leaf | `number` \ (`model`: `NodeModel`) => `number` | 2 | 2 | the center force strength for leaf nodes (with 1 degree) |
| others | `number` \ (`model`: `NodeInnerModel`) => `number` | 1 | 1 | the center force strength for other nodes beside leaf and discrete nodes | | others | `number` \ (`model`: `NodeModel`) => `number` | 1 | 1 | the center force strength for other nodes beside leaf and discrete nodes |
| center | (`model`: `NodeInnerModel`) => `{ x: number; y: number}` | (node, nodes, edges) => ({ x: 10, y: 10 }) | center of the graph | the center force's coordinate. You can return different values for different nodes | | center | (`model`: `NodeModel`) => `{ x: number; y: number}` | (node, nodes, edges) => ({ x: 10, y: 10 }) | center of the graph | the center force's coordinate. You can return different values for different nodes |
## leafCluster ## leafCluster
@ -268,7 +268,7 @@ This document shows all the options for force-directed layout. [Force-Directed L
## clusterNodeStrength ## clusterNodeStrength
**Type**: `number` \| (`model`: `NodeInnerModel`) => `number` **Type**: `number` \| (`model`: `NodeModel`) => `number`
**Default**: `20` **Default**: `20`

View File

@ -50,7 +50,7 @@ order: 1
## getCenter ## getCenter
**类型**(`model`: `NodeInnerModel`) => `number` **类型**(`model`: `NodeModel`) => `number`
**默认值**`undefined` **默认值**`undefined`
@ -81,7 +81,7 @@ order: 1
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**默认值**:读取节点数据中的 `data.size`,若无则默认值为 `10` **默认值**:读取节点数据中的 `data.size`,若无则默认值为 `10`
@ -91,7 +91,7 @@ order: 1
## nodeSpacing ## nodeSpacing
**类型**`number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**默认值**`10` **默认值**`10`
@ -101,7 +101,7 @@ order: 1
## linkDistance ## linkDistance
**类型**`number` \| (`model`: `EdgeInnerModel`) => `number` **类型**`number` \| (`model`: `EdgeModel`) => `number`
**默认值**`200` **默认值**`200`
@ -111,7 +111,7 @@ order: 1
## nodeStrength ## nodeStrength
**类型**`number` \| (`model`: `NodeInnerModel`) => `number` **类型**`number` \| (`model`: `NodeModel`) => `number`
**默认值**`1000` **默认值**`1000`
@ -121,7 +121,7 @@ order: 1
## edgeStrength ## edgeStrength
**类型**`number` \| (`model`: `EdgeInnerModel`) => `number` **类型**`number` \| (`model`: `EdgeModel`) => `number`
**默认值**`200` **默认值**`200`
@ -161,7 +161,7 @@ order: 1
## getMass ## getMass
**类型**(`model`: `NodeInnerModel`) => `number` **类型**(`model`: `NodeModel`) => `number`
**默认值**:在 G6 中使用,增量布局时已存在的节点质量将被加大,以保持已有内容的稳定。其他情况下节点质量为 `1` **默认值**:在 G6 中使用,增量布局时已存在的节点质量将被加大,以保持已有内容的稳定。其他情况下节点质量为 `1`
@ -229,12 +229,12 @@ order: 1
**说明**:向心力配置,包括叶子节点、离散点、其他节点的向心中心及向心力大小 **说明**:向心力配置,包括叶子节点、离散点、其他节点的向心中心及向心力大小
| Parameter | Type | Example | Default | Description | | Parameter | Type | Example | Default | Description |
| --------- | -------------------------------------------------------- | ------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------- | | --------- | --------------------------------------------------- | ------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------- |
| single | `number` \ (`model`: `NodeInnerModel`) => `number` | 2 | 2, | the center force strength for discrete nodes (with 0 degree) | | single | `number` \ (`model`: `NodeModel`) => `number` | 2 | 2, | the center force strength for discrete nodes (with 0 degree) |
| leaf | `number` \ (`model`: `NodeInnerModel`) => `number` | 2 | 2 | the center force strength for leaf nodes (with 1 degree) | | leaf | `number` \ (`model`: `NodeModel`) => `number` | 2 | 2 | the center force strength for leaf nodes (with 1 degree) |
| others | `number` \ (`model`: `NodeInnerModel`) => `number` | 1 | 1 | the center force strength for other nodes beside leaf and discrete nodes | | others | `number` \ (`model`: `NodeModel`) => `number` | 1 | 1 | the center force strength for other nodes beside leaf and discrete nodes |
| center | (`model`: `NodeInnerModel`) => `{ x: number; y: number}` | (node, nodes, edges) => ({ x: 10, y: 10 }) | center of the graph | the center force's coordinate. You can return different values for different nodes | | center | (`model`: `NodeModel`) => `{ x: number; y: number}` | (node, nodes, edges) => ({ x: 10, y: 10 }) | center of the graph | the center force's coordinate. You can return different values for different nodes |
## leafCluster ## leafCluster
@ -268,7 +268,7 @@ order: 1
## clusterNodeStrength ## clusterNodeStrength
**类型**`number` \| (`model`: `NodeInnerModel`) => `number` **类型**`number` \| (`model`: `NodeModel`) => `number`
**默认值**`20` **默认值**`20`

View File

@ -69,7 +69,7 @@ This article shows all the configuration options for the grid layout. [Grid Layo
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**Default**: Reads the `data.size` in the node model. If not specified, the default value is `10`. **Default**: Reads the `data.size` in the node model. If not specified, the default value is `10`.
@ -99,7 +99,7 @@ This article shows all the configuration options for the grid layout. [Grid Layo
## position ## position
**Type**: (`node?`: `NodeInnerModel`) => { `row?`: `number`; `col?`: `number`; } **Type**: (`node?`: `NodeModel`) => { `row?`: `number`; `col?`: `number`; }
**Default**: `undefined` **Default**: `undefined`

View File

@ -69,7 +69,7 @@ order: 7
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`model`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`model`: `NodeModel`) => `number`
**默认值**:读取节点数据中的 `data.size`,若无则默认值为 `10` **默认值**:读取节点数据中的 `data.size`,若无则默认值为 `10`
@ -99,7 +99,7 @@ order: 7
## position ## position
**类型** (`node?`: `NodeInnerModel`) => { `row?`: `number`; `col?`: `number`; } **类型** (`node?`: `NodeModel`) => { `row?`: `number`; `col?`: `number`; }
**默认值**`undefined` **默认值**`undefined`

View File

@ -19,7 +19,7 @@ This article shows all the configuration options for the MDS layout, which is us
## linkDistance ## linkDistance
**Type**: `number` \| (`model`: `EdgeInnerModel`) => `number` **Type**: `number` \| (`model`: `EdgeModel`) => `number`
**Default**: `200` **Default**: `200`

View File

@ -19,7 +19,7 @@ order: 12
## linkDistance ## linkDistance
**类型**`number` \| (`model`: `EdgeInnerModel`) => `number` **类型**`number` \| (`model`: `EdgeModel`) => `number`
**默认值**`200` **默认值**`200`

View File

@ -80,7 +80,7 @@ This article shows all the configuration options for the radial layout. [Radial
## nodeSize ## nodeSize
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `10` **Default**: `10`
@ -90,7 +90,7 @@ This article shows all the configuration options for the radial layout. [Radial
## nodeSpacing ## nodeSpacing
**Type**: `number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **Type**: `number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**Default**: `10` **Default**: `10`

View File

@ -80,7 +80,7 @@ order: 6
## nodeSize ## nodeSize
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`10` **默认值**`10`
@ -90,7 +90,7 @@ order: 6
## nodeSpacing ## nodeSpacing
**类型**`number` \| `number`[] \| (`nodeModel`: `NodeInnerModel`) => `number` **类型**`number` \| `number`[] \| (`nodeModel`: `NodeModel`) => `number`
**默认值**`10` **默认值**`10`