diff --git a/en/option/partial/zr-graphic.md b/en/option/partial/zr-graphic.md index d54b71b3..0f4086a2 100644 --- a/en/option/partial/zr-graphic.md +++ b/en/option/partial/zr-graphic.md @@ -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}, @@ -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). - diff --git a/zh/option/partial/zr-graphic.md b/zh/option/partial/zr-graphic.md index a0fce1a0..a2a58055 100644 --- a/zh/option/partial/zr-graphic.md +++ b/zh/option/partial/zr-graphic.md @@ -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}, @@ -2017,4 +2022,3 @@ type TransformProp = ``` 也参见这个 [例子](${galleryEditorPath}custom-spiral-race&edit=1&reset=1)。 -