antvis / layout

Layout algorithms for graphs.
193 stars 55 forks source link

X6, 2.0.8 使用报错 #190

Closed MusicDataFeTeam closed 10 months ago

MusicDataFeTeam commented 10 months ago

x6: 版本2.0.8 layout 版本:0.3.23

` const handleLayoutChange = () => { const { graph } = data; const gridLayout = new GridLayout({ type: 'grid', width: 600, height: 400, center: [300, 200], rows: 4, cols: 4 });

console.log({nodes: graph.getNodes(), edges: graph.getEdges()})

const newModel = gridLayout.layout({ nodes: graph.getNodes(), edges: graph.getEdges() });

// console.log(newModel);
graph.fromJSON(newModel);`

报错
image

node 里面是不是数据结构变了?