Skip to content

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

style search node

AykutSarac98b56deaa5df
diff --git a/src/components/CustomNode/styles.tsx b/src/components/CustomNode/styles.tsx
index be5a1f6f..46093226 100644
--- a/src/components/CustomNode/styles.tsx
+++ b/src/components/CustomNode/styles.tsx
@@ -34,8 +34,8 @@ export const StyledForeignObject = styled.foreignObject<{
}
.highlight {
- background-color: rgba(255, 0, 255, 0.5);
- filter: hue-rotate();
+ border: 2px dashed #FF2970;
+ background: rgba(255, 214, 0, 0.3);
}
.renderVisible {
diff --git a/src/hooks/useFocusNode.tsx b/src/hooks/useFocusNode.tsx
index b594d8ed..120fb51f 100644
--- a/src/hooks/useFocusNode.tsx
+++ b/src/hooks/useFocusNode.tsx
@@ -23,7 +23,7 @@ export const useFocusNode = () => {
const debouncer = setTimeout(() => {
setContent((val) => ({ ...val, debounced: content.value }));
- }, 1500);
+ }, 800);
return () => clearTimeout(debouncer);
}, [content.value, setConfig]);
diff --git a/src/utils/search.ts b/src/utils/search.ts
index 43c807c8..7b4366ba 100644
--- a/src/utils/search.ts
+++ b/src/utils/search.ts
@@ -16,9 +16,9 @@ export const highlightMatchedNodes = (
selectedNode: number
) => {
nodes?.forEach((node) => {
- node.parentElement?.parentElement
- ?.closest("foreignObject")
- ?.classList.add("searched");
+ console.log(node.parentElement?.closest("foreignObject"));
+
+ node.parentElement?.closest("foreignObject")?.classList.add("searched");
});
nodes[selectedNode].classList.add("highlight");