antvis/G6

通过graph.updateItem更新combo的collapsedSubstituteIcon属性不生效 #5351

lvvgang posted onGitHub

问题描述

通过graph.updateItem更新combo的collapsedSubstituteIcon属性不生效

重现链接

https://g6.antv.antgroup.com/zh/examples/item/defaultCombos/#rect

重现步骤

  1. 设置combo
combos: [
    {
      id: 'combo2',
      label: 'with substitute icon while collapsed',
      collapsed: true,
      collapsedSubstituteIcon: {
        show: true,
        img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IEQFS5VtXX8AAAAAAAAAAABkARQnAQ',
        width: 72,
        height: 72
      }
    },
  ]
  1. 更新collapsedSubstituteIcon属性
graph.updateItem(item.id, {
    label: item.label,
    status: item.status,
    collapsedSubstituteIcon: {
        img: 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg'
    }
});

预期行为

调用updateItem后更新为新的图片

平台

  • 操作系统: Windows
  • 网页浏览器: Google Chrome
  • G6 版本: 4.8.21

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


i am also facing the same issue

posted by SUMIT6409 about 1 year ago

@Yanyan-Wang please help here.

posted by SUMIT6409 about 1 year ago

@Yanyan-Wang please reply here, ill be really grateful

posted by SUMIT6409 about 1 year ago

遇到了同样的问题

posted by sunrisexl about 1 year ago

Encountered the same problem use graph.read(yourdata) after update item operation. the update will take effect

posted by SUMIT6409 about 1 year ago

Encountered the same problem use graph.read(yourdata) after update item operation. the update will take effect

It worked. Thank you.

posted by sunrisexl about 1 year ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 6 months ago

Fund this Issue

$0.00
Funded

Pull requests