From b33f13ccaf4ec14a94ee0ee467dda04cf4981d00 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 01 Jan 2024 22:20:34 +0000
Subject: [PATCH] fix: dont show last page if folder
---
quartz/components/Graph.tsx | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/quartz/components/Graph.tsx b/quartz/components/Graph.tsx
index 0c54bdb..0c2647f 100644
--- a/quartz/components/Graph.tsx
+++ b/quartz/components/Graph.tsx
@@ -1,4 +1,4 @@
-import { QuartzComponentConstructor } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
// @ts-ignore
import script from "./scripts/graph.inline"
import style from "./styles/graph.scss"
@@ -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,15 +46,17 @@
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, }
+ function Graph({ displayClass }: QuartzComponentProps) {
+ const localGraph = { ...defaultOptions.localGraph, ...opts?.localGraph }
+ const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph }
return (
- <div class="graph">
+ <div class={`graph ${displayClass ?? ""}`}>
<h3>Graph View</h3>
<div class="graph-outer">
<div id="graph-container" data-cfg={JSON.stringify(localGraph)}></div>
--
Gitblit v1.10.0