summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/index.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 6fc83e2..d32ebc4 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -641,6 +641,10 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
}))
},
onBackgroundClick: () => {
+ setHoverNode(null)
+ if (scope.nodeIds.length === 0) {
+ return
+ }
setScope((currentScope) => ({
...currentScope,
nodeIds: [],