Skip to content

Commit

Permalink
add color to visualisation, and metadata changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bercivarga committed Mar 10, 2024
1 parent 653495b commit 332ebe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions app/(platform)/map/interactive-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ export default function InteractiveMap({ notes }: Props) {
setData(graphData);
}, [notes]);

if (!data)
if (!data) {
return (
<div
className="absolute inset-0 flex items-center justify-center bg-slate-900 text-white"
ref={containerRef}
>
<div>Loading...</div>
<div>Preparing your graph...</div>
</div>
);
}

return (
<div
Expand All @@ -73,11 +74,10 @@ export default function InteractiveMap({ notes }: Props) {
width={containerRef.current?.clientWidth ?? 0}
height={containerRef.current?.clientHeight ?? 0}
graphData={data}
nodeAutoColorBy="group"
linkDirectionalParticles={2}
linkDirectionalParticleWidth={2}
linkDirectionalParticleSpeed={0.005}
linkDirectionalParticleColor={() => "rgba(255, 255, 255, 0.5)"}
nodeAutoColorBy="name"
linkDirectionalParticles="value"
linkDirectionalParticleSpeed={(d) => d.value * 0.001}
linkDirectionalParticleResolution={3}
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion app/(platform)/map/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Interactive map",
title: "Map of your notes",
description: "Explore your notes and their relationships.",
};

Expand Down

0 comments on commit 332ebe8

Please sign in to comment.