From e61f1e124f052e2317385b48f0b474175f685378 Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <thomasfkjorna@gmail.com>
Date: Thu, 29 Jul 2021 18:25:08 +0200
Subject: emacsnode for mlord

---
 pages/index.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'pages/index.tsx')

diff --git a/pages/index.tsx b/pages/index.tsx
index d32ebc4..96d3ba8 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -417,6 +417,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
       opacity > 0.5 ? fadeOut() : setOpacity(0)
     }
   }, [hoverNode])
+
   const theme = useTheme()
   const themeContext = useContext<ThemeContextProps>(ThemeContext)
 
@@ -507,10 +508,12 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
   }
 
   const getNodeColor = (node: OrgRoamNode) => {
-    // I'm so sorry
     const needsHighlighting = highlightedNodes[node.id!] || previouslyHighlightedNodes[node.id!]
     // if we are matching the node color and don't have a highlight color
     // or we don't have our own scheme and we're not being highlighted
+    if (visuals.emacsNodeColor && node.id === emacsNodeId) {
+      return theme.colors[visuals.emacsNodeColor][500]
+    }
     if (!needsHighlighting) {
       return theme.colors[getNodeColorById(node.id)][500]
     }
@@ -643,7 +646,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
     onBackgroundClick: () => {
       setHoverNode(null)
       if (scope.nodeIds.length === 0) {
-        return 
+        return
       }
       setScope((currentScope) => ({
         ...currentScope,
-- 
cgit v1.2.3

