Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

improve search focus

AykutSarac8268afbc6a4a
diff --git a/src/hooks/useFocusNode.tsx b/src/hooks/useFocusNode.tsx
index 5d9178cd..549e7701 100644
--- a/src/hooks/useFocusNode.tsx
+++ b/src/hooks/useFocusNode.tsx
@@ -39,13 +39,13 @@ export const useFocusNode = () => {
const newPositionX =
(ref.offsetLeft - x) * newScale +
- ref.clientWidth / 4 -
- matchedNode.getBoundingClientRect().width / 4;
+ ref.clientWidth / 5 -
+ matchedNode.getBoundingClientRect().width / 5;
const newPositionY =
(ref.offsetLeft - y) * newScale +
- ref.clientHeight / 4 -
- matchedNode.getBoundingClientRect().height / 4;
+ ref.clientHeight / 8 -
+ matchedNode.getBoundingClientRect().height / 8;
highlightMatchedNodes(matchedNodes, selectedNode);
setNodeCount(matchedNodes.length);