mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 20:59:15 +08:00
docs: update the url for Shape in docs.
This commit is contained in:
parent
84deddb0ba
commit
6342b38bab
@ -14,7 +14,7 @@ When the built-in nodes cannot satisfy your requirments, custom a type of node b
|
||||
| Name | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| nodeName | String | true | The unique name of the custom node. |
|
||||
| options | Object | true | The configurations of custom node, include functions of complete life cycles. Please refer to [Shape API](/en/docs/api/Shape). |
|
||||
| options | Object | true | The configurations of custom node, include functions of complete life cycles. Please refer to [Shape Doc](/en/docs/manual/middle/elements/shape-keyshape) and [Custom Item API](/en/docs/api/CustomItem). |
|
||||
| extendedNodeName | String | false | Specifies the inherited node type of the custom node. Declare this property if you want to extend a built-in node. [Built-in Nodes](/en/docs/manual/middle/elements/nodes/defaultNode) document. |
|
||||
|
||||
### Usage
|
||||
@ -77,7 +77,7 @@ When the built-in edges cannot satisfy your requirments, custom a type of edge b
|
||||
| Name | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| edgeName | String | true | The unique name of the custom edge. |
|
||||
| options | Object | true | The configurations of custom edge, include functions of complete life cycles. Please refer to [Shape API](/en/docs/api/Shape). |
|
||||
| options | Object | true | The configurations of custom edge, include functions of complete life cycles. Please refer to [Shape Doc](/en/docs/manual/middle/elements/shape-keyshape) and [Custom Item API](/en/docs/api/CustomItem). |
|
||||
| extendedEdgeName | String | false | Specifies the inherited node type of the custom node. Declare this property if you want to extend the a built-in edge. [Built-in Edges](/en/docs/manual/middle/elements/edges/defaultEdge) document. |
|
||||
|
||||
### Usage
|
||||
@ -136,7 +136,7 @@ When the built-in combos cannot satisfy your requirments, custom a type of combo
|
||||
| Name | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| comboName | String | true | The unique name of the custom combo. |
|
||||
| options | Object | true | The configurations of custom combo, include functions of complete life cycles. Please refer to [Shape API](/en/docs/api/Shape). |
|
||||
| options | Object | true | The configurations of custom combo, include functions of complete life cycles. Please refer to [Shape Doc](/en/docs/manual/middle/elements/shape-keyshape) and [Custom Item API](/en/docs/api/CustomItem). |
|
||||
| extendedComboName | String | false | Specifies the inherited combo type of the custom combo. Declare this property if you want to extend a built-in combo. [Built-in Combos](/en/docs/manual/middle/elements/combos/defaultCombo) document. |
|
||||
|
||||
### Usage
|
||||
|
@ -14,7 +14,7 @@ order: 9
|
||||
| 名称 | 类型 | 是否必选 | 描述 |
|
||||
| --- | --- | --- | --- |
|
||||
| nodeName | String | true | 自定义节点名称,需保持唯一性。 |
|
||||
| options | Object | true | 自定义节点时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape API](/zh/docs/api/Shape)。 |
|
||||
| options | Object | true | 自定义节点时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape Doc](/zh/docs/manual/middle/elements/shape-keyshape) 和 [自定义节点与边 API](/zh/docs/api/CustomItem)。 |
|
||||
| extendNodeName | String | false | 自定义节点时可基于内置节点进行定义,该字段表示内置节点名称,所有内置节点请参考:[内置节点](/zh/docs/manual/middle/elements/nodes/defaultNode) 教程。 |
|
||||
|
||||
### 用法
|
||||
@ -78,7 +78,7 @@ G6.registerNode(
|
||||
| 名称 | 类型 | 是否必选 | 描述 |
|
||||
| --- | --- | --- | --- |
|
||||
| edgeName | String | true | 自定义边的名称 |
|
||||
| options | Object | true | 自定义边时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape API](/zh/docs/api/Shape)。 |
|
||||
| options | Object | true | 自定义边时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape Doc](/zh/docs/manual/middle/elements/shape-keyshape) 和 [自定义节点与边 API](/zh/docs/api/CustomItem)。 |
|
||||
| extendedEdgeName | String | false | 自定义边时可基于内置边进行定义,该字段表示内置边的名称,所有内置边请参考:[内置边](/zh/docs/manual/middle/elements/edges/defaultEdge) 教程。 |
|
||||
|
||||
### 用法
|
||||
@ -136,7 +136,7 @@ G6.registerEdge(
|
||||
| 名称 | 类型 | 是否必选 | 描述 |
|
||||
| --- | --- | --- | --- |
|
||||
| comboName | String | true | 自定义 combo 的名称,需保持唯一性。 |
|
||||
| options | Object | true | 自定义 combo 时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape API](/zh/docs/api/Shape)。 |
|
||||
| options | Object | true | 自定义 combo 时的配置项,配置项中包括完整的生命周期方法,具体请参考:[Shape Doc](/zh/docs/manual/middle/elements/shape-keyshape) 和 [自定义节点与边 API](/zh/docs/api/CustomItem)。 |
|
||||
| extendedComboName | String | false | 自定义节点时可基于内置 combo 进行定义,该字段表示内置 combo 名称,所有内置 Combo 请参考:[内置节点](/zh/docs/manual/middle/elements/combos/defaultCombo) 教程。 |
|
||||
|
||||
### 用法
|
||||
|
@ -50,7 +50,7 @@ group.addGroup({
|
||||
|
||||
### addShape(type, cfgs)
|
||||
|
||||
Add a new shape into the group<br /><span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️Attention:</strong></span> the clip and transform operations will affect all the shapes in the group. The graphics and their properties are introduced in [Shape API](/en/docs/api/Shape)。
|
||||
Add a new shape into the group<br /><span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️Attention:</strong></span> the clip and transform operations will affect all the shapes in the group. The graphics and their properties are introduced in [Shape Doc](/en/docs/manual/middle/elements/shape-keyshape).
|
||||
|
||||
**Parameters**
|
||||
|
||||
|
@ -51,7 +51,7 @@ group.addGroup({
|
||||
|
||||
### addShape(type, cfgs)
|
||||
|
||||
向分组中添加新的图形。<br /><span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️ 注意:</strong></span> 在分组上添加的 clip, transform 等操作会影响到该分组中的所有图形。所有图形及其绘图属性请见 [Shape API](/zh/docs/api/Shape)。
|
||||
向分组中添加新的图形。<br /><span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️ 注意:</strong></span> 在分组上添加的 clip, transform 等操作会影响到该分组中的所有图形。所有图形及其绘图属性请见 [Shape Doc](/zh/docs/manual/middle/elements/shape-keyshape)。
|
||||
|
||||
**参数**
|
||||
|
||||
|
@ -10,7 +10,7 @@ In a graph of G6, there are Node, Edge, and Combo items. Each [item](/en/docs/ap
|
||||
| Property | Type | Required | Description |
|
||||
| ----- | ------ | ------- |------------------------------ |
|
||||
| id | String | true | The ID of the item, **MUST** be unique and string |
|
||||
| style | Object | false | The style of the item's [keyShape](/zh/docs/manual/middle/elements/shape-keyshape). Its properites are related to the type of the keyShape. Refer to [Shape Style Properties](/en/docs/api/nodeEdge/shapeProperties) |
|
||||
| style | Object | false | The style of the item's [keyShape](/en/docs/manual/middle/elements/shape-keyshape). Its properites are related to the type of the keyShape. Refer to [Shape Style Properties](/en/docs/api/nodeEdge/shapeProperties) |
|
||||
| type | String | false | The type name of the item. 'line' is the default value for Edge, 'circle' for Node, and 'circle' for Combo |
|
||||
| label | String | false | The text of the item's label. The text will be rendered if the `label` property exist |
|
||||
| labelCfg | Object | false | The configurations for the label. It is different for Node, Combo, and Edge. Check out the following content for more detail |
|
||||
|
@ -124,4 +124,4 @@ There are three key functions of custom node and edge which should be rewrited a
|
||||
- `update(cfg, n)`: Update the item according to the configurations and the item;
|
||||
- `setState(name, value, item)`: Response the states change for items.
|
||||
|
||||
For more information, refer to [Shape API](/en/docs/api/Shape).
|
||||
For more information about custom node and edge, refer to [Custom Item API](/en/docs/api/CustomItem).
|
||||
|
@ -126,4 +126,4 @@ Shape 作为 Graph 上的核心元素,这几个阶段都需要考虑,但是
|
||||
- `update(cfg, n)`: 更新,更新时的配置项(更新的字段和原始字段的合并)和元素对象;
|
||||
- `setState(name, value, item)`: 响应节点/边/ Combo 状态的变化。
|
||||
|
||||
关于自定义 Shape 更多的方法请参考 [Shape API](/zh/docs/api/Shape)。
|
||||
关于自定义节点和边的更多方法请参考 [自定义节点与边 API](/zh/docs/api/CustomItem)。
|
||||
|
Loading…
Reference in New Issue
Block a user