mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 15:05:42 -05:00
chore(graph): increase linkDistance
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
84f7d31672
commit
847354cf18
@ -45,9 +45,9 @@ const defaultOptions: GraphOptions = {
|
|||||||
zoom: true,
|
zoom: true,
|
||||||
depth: -1,
|
depth: -1,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
repelForce: 0.5,
|
repelForce: 1.5,
|
||||||
centerForce: 0.1,
|
centerForce: 0.3,
|
||||||
linkDistance: 30,
|
linkDistance: 90,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
opacityScale: 1,
|
opacityScale: 1,
|
||||||
showTags: true,
|
showTags: true,
|
||||||
|
|||||||
@ -158,10 +158,7 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
|||||||
.id((d: any) => d.id)
|
.id((d: any) => d.id)
|
||||||
.distance(linkDistance),
|
.distance(linkDistance),
|
||||||
)
|
)
|
||||||
.force(
|
.force("collide", d3.forceCollide<NodeData>((n) => nodeRadius(n)).iterations(3))
|
||||||
"collide",
|
|
||||||
d3.forceCollide((n) => nodeRadius(n)),
|
|
||||||
)
|
|
||||||
|
|
||||||
const width = graph.offsetWidth
|
const width = graph.offsetWidth
|
||||||
const height = Math.max(graph.offsetHeight, 250)
|
const height = Math.max(graph.offsetHeight, 250)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user