summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-08-03 16:30:49 +0200
committerThomas F. K. Jorna <[email protected]>2021-08-03 16:30:49 +0200
commitd53af1704c33192e696d71143fa4895176a1e28a (patch)
treeb0aeeb5ca0fc74889ecfcf38ed1cdfde036ac0fe /pages
parent57ff943843831fbe041ec2e2a923fa70a2f805f3 (diff)
feature: citelink highlight color
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 70f895a..02be883 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -411,6 +411,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
const hiddenNodeIdsRef = useRef<NodeById>({})
const filteredGraphData = useMemo(() => {
+ hiddenNodeIdsRef.current = {}
const filteredNodes = graphData.nodes
.filter((nodeArg) => {
const node = nodeArg as OrgRoamNode
@@ -580,6 +581,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
visuals.nodeHighlight || [],
visuals.citeNodeColor || [],
visuals.citeLinkColor || [],
+ visuals.citeLinkHighlightColor || [],
)
return Object.fromEntries(
@@ -805,8 +807,10 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
const needsHighlighting = linkIsHighlighted || linkWasHighlighted
const roamLink = link as OrgRoamLink
if (visuals.citeLinkColor && roamLink.type === 'cite') {
- return needsHighlighting
- ? '#ffffff' /*highlightColors[visuals.citeLinkColor][visuals.citeLinkHighlightColor] */
+ return needsHighlighting && (visuals.citeLinkHighlightColor || visuals.linkHighlight)
+ ? highlightColors[visuals.citeLinkColor][
+ visuals.citeLinkHighlightColor || visuals.linkHighlight
+ ](opacity)
: getThemeColor(visuals.citeLinkColor)
}