From 49147f39a858aa16b248016122b61535117c40c0 Mon Sep 17 00:00:00 2001 From: Nyck Date: Mon, 3 Jul 2023 19:57:19 +0100 Subject: [PATCH] Save tree view on frontend now doesn't send nodes, only transformations. This is because the backend is not able to save the coordinates yet. --- .../TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/Pages/Project/TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts b/src/frontend/src/Pages/Project/TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts index eed7503..defa6fb 100644 --- a/src/frontend/src/Pages/Project/TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts +++ b/src/frontend/src/Pages/Project/TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts @@ -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!,