From de562a4956fab9b04bf3bec8a86f5be34fa86773 Mon Sep 17 00:00:00 2001 From: Nyck Date: Mon, 3 Jul 2023 19:53:19 +0100 Subject: [PATCH] Tree view's focus random button now behaves the same as normal ST search (parameters of zoomToNodeById where tweaked). --- .../TreeView/Layouts/ForceDirectedLayout/utils/useGraph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 06e2da6..eed7503 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 @@ -180,7 +180,7 @@ export function useGraph(projectId: string, datasetId: string, treeViewId: strin canvasRef, loadingGraph, selectedCluster, - focusRandom: () => graphRef.current?.zoomToNodeById(clusters[selectedCluster].nodes[Math.floor(Math.random() * clusters[selectedCluster].nodes.length)].st), + focusRandom: () => graphRef.current?.zoomToNodeById(clusters[selectedCluster].nodes[Math.floor(Math.random() * clusters[selectedCluster].nodes.length)].st, 1000, 15, false), setSelectedCluster: (i: number) => { const cluster = clusters[i]