Ben Schlegel
2023-09-18 0d3cf2922618774fc397dca8cb92fcf76fb0db02
quartz/components/Graph.tsx
@@ -13,6 +13,8 @@
  linkDistance: number
  fontSize: number
  opacityScale: number
  removeTags: string[]
  showTags: boolean
}
interface GraphOptions {
@@ -31,6 +33,8 @@
    linkDistance: 30,
    fontSize: 0.6,
    opacityScale: 1,
    showTags: true,
    removeTags: [],
  },
  globalGraph: {
    drag: true,
@@ -42,13 +46,15 @@
    linkDistance: 30,
    fontSize: 0.6,
    opacityScale: 1,
    showTags: true,
    removeTags: [],
  },
}
export default ((opts?: GraphOptions) => {
  function Graph() {
    const localGraph = { ...defaultOptions.localGraph, ...opts?.localGraph, }
    const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph, }
    const localGraph = { ...defaultOptions.localGraph, ...opts?.localGraph }
    const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph }
    return (
      <div class="graph">
        <h3>Graph View</h3>