Cannot read property 'attr' of null
执行 graph.update() 方法的时候,报错
TypeError: Cannot read property 'attr' of null at Object.update (g6.js?07cd:1) at Object.update (g6.js?07cd:1) at e.updateShape (g6.js?07cd:1) at e.refresh (g6.js?07cd:1) at t.e.refreshItem (g6.js?07cd:1) at n.e.refreshItem (g6.js?07cd:1) at eval (g6.js?07cd:1) at Object.t.exports [as each] (g6.js?07cd:1) at t.e.updateItem (g6.js?07cd:1) at n.e.updateItem (g6.js?07cd:1)
3.0.5-beta.6 版本。
这种写法,压根解决不了问题。要么写个demo ,要么自己调试一下。
如果楼主是要更新节点的位置的话可以用 Item 的 updatePosition 方法,https://www.yuque.com/antv/g6/item#XoMRH,我也是在更新位置的时候用 graph.update() 报这个错,但是用 Item 的 updatePosition 方法就可以