Skip to content

Commit

Permalink
Save tree view on frontend now doesn't send nodes, only transformatio…
Browse files Browse the repository at this point in the history
…ns. This is because the backend is not able to save the coordinates yet.
  • Loading branch information
Nyckoka committed Jul 3, 2023
1 parent de562a4 commit 49147f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ export function useGraph(projectId: string, datasetId: string, treeViewId: strin
setSavingGraph(true)
console.log("saving graph")
VisualizationService.saveTreeView(projectId, datasetId, treeViewId, {
nodes: Object.entries(graphRef.current?.getNodePositions()).map(([st, coordinates]) => {
nodes: []/*Object.entries(graphRef.current?.getNodePositions()).map(([st, coordinates]) => {
return {
st,
coordinates: Object.values(coordinates)
}
}),
})*/,
transformations: {
linkSpring: graphRef.current.config.simulation.linkSpring!,
linkDistance: graphRef.current.config.simulation.linkDistance!,
Expand Down

0 comments on commit 49147f3

Please sign in to comment.