Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion en/option/partial/zr-graphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

`group` is the only type that can contain children, so that a group of elements can be positioned and transformed together.

{{ if: ${usageType} === 'customSeries' }}
Note that if any of its child is `null`, it means the child no longer exists. So if a group contains an element that is set to be `null/undefined` in a future `setOption` call, it should remove the previous element at the same index. If a child should not change, it should be `{}` in the new option. And a group can only contain children as `null/undefined/{}` if they exist in the previous `setOption`.

{{ /if }}

{{ use: partial-graphic-cpt-common-props(
type = 'group',
prefix = ${prefix},
Expand Down Expand Up @@ -2046,4 +2051,3 @@ Although the points will be interpolated, the consequent animation will be like
```

See this example [example](${galleryEditorPath}custom-spiral-race&edit=1&reset=1).

6 changes: 5 additions & 1 deletion zh/option/partial/zr-graphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

group 是唯一的可以有子节点的容器。group 可以用来整体定位一组图形元素。

{{ if: ${usageType} === 'customSeries' }}
注意,如果其任意子节点是 `null`,这表示该子节点不再存在。所以,如果再次调用 `setOption` 时,一个子节点被设为 `null`,这意味着它之前对应序号的元素会被删除。如果希望一个子节点保持不变,应在新的配置项中使用 `{}` 表示。并且,仅当 group 的子节点在之前的 `setOption` 中存在时,才可以使用 `null/undefined/{}` 作为子节点。

{{ /if }}

{{ use: partial-graphic-cpt-common-props(
type = 'group',
prefix = ${prefix},
Expand Down Expand Up @@ -2017,4 +2022,3 @@ type TransformProp =
```

也参见这个 [例子](${galleryEditorPath}custom-spiral-race&edit=1&reset=1)。