G6 icon indicating copy to clipboard operation
G6 copied to clipboard

updateChildren、updateChild等,执行后会清空所有节点状态,这会导致选中态等状态需要再更新后手动赋值

Open cicada-ah opened this issue 1 year ago • 3 comments

Describe the bug

请教下原因:updateChildren、updateChild等,执行后会清空所有节点状态,这会导致父节点选中态等状态需要再更新后手动赋值,我想这是不符合预期的吧,例如选中节点,在属性面板中updateChildren,此时预期是状态未被清空

Your Example Website or App

Steps to Reproduce the Bug or Issue

  1. 选中节点状态
  2. 调用updateChildren
  3. updateChaildren调用updateData方法,会遍历所有节点和边,并清空状态

Expected behavior

上述操作不必清空状态,至少updateChildren和changeData可以添加option去交给开发者取舍,否则要重写继承,成本有些大

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

cicada-ah avatar Jun 14 '23 03:06 cicada-ah

如果大佬们最近迁移,没时间搞,方案ok的话,我可以提issues

cicada-ah avatar Jun 14 '23 04:06 cicada-ah

哇哇哇,当然欢迎 PR ~~ 感谢

Yanyan-Wang avatar Jun 15 '23 07:06 Yanyan-Wang

请问这个有进展吗

conviva-zyang avatar Jan 01 '24 13:01 conviva-zyang