Skip to content

Commit

Permalink
fix color fill
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Sep 13, 2024
1 parent a1afec2 commit 2af9148
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/components/GraphNavigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const circles: Circle[] = Astro.props.circles
const color: Color = Astro.props.color || Color.primary;
function getColorStr(color: Color) {
function getColorFill(color: Color) {
switch (color) {
case Color.primary:
return "primary";
return "fill-primary";
case Color.accent:
return "accent";
return "fill-accent";
default:
return "primary";
return "fill-primary";
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@ const calculateTextAnchor = (textX: number, circleCx: number, radialPosition: nu
cx={circle.cx}
cy={circle.cy}
r={circle.r}
class={"fill-" + getColorStr(color) + " stroke-base-content stroke-1"}
class={getColorFill(color) + " stroke-base-content stroke-1"}
/>
<!-- Add a curved line (arc) connecting the circle to the text -->
<path
Expand Down
3 changes: 2 additions & 1 deletion src/components/Home/ResearchGraphNavigation.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import { URLS } from "../../statics";
import GraphNavigation from "../GraphNavigation.astro";
import { Color } from "../GraphNavigation.astro";
const circles = [
{ id: 1, cx: 8, cy: 10, r: 5, href: URLS.Internal_Home + "/details/documentation-principle", text: 'documentation principle', angle: 80 },
Expand All @@ -11,4 +12,4 @@ const circles = [
];
---

<GraphNavigation circles={circles}></GraphNavigation>
<GraphNavigation circles={circles} color={Color.primary}></GraphNavigation>
1 change: 0 additions & 1 deletion src/plugins/remark-dictionary-tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export function remarkReplaceTooltips(): Plugin<[], Root> {
// Traverse the tree and apply replacements
visit(tree, (node) => {
// Check if the node is a heading, if so, skip it
console.log("--NEW--")
if (node.type === 'heading') {
return; // Skip headers
}
Expand Down

0 comments on commit 2af9148

Please sign in to comment.