mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-28 07:14:05 -06:00
fix: explicitly use center div
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
7995078f66
commit
91c9f635d8
@ -145,7 +145,8 @@ const cssVars = [
|
|||||||
] as const
|
] as const
|
||||||
|
|
||||||
document.addEventListener("nav", async () => {
|
document.addEventListener("nav", async () => {
|
||||||
const nodes = document.querySelectorAll("code.mermaid") as NodeListOf<HTMLElement>
|
const center = document.querySelector(".center") as HTMLElement
|
||||||
|
const nodes = center.querySelectorAll("code.mermaid") as NodeListOf<HTMLElement>
|
||||||
if (nodes.length === 0) return
|
if (nodes.length === 0) return
|
||||||
|
|
||||||
const computedStyleMap = cssVars.reduce(
|
const computedStyleMap = cssVars.reduce(
|
||||||
@ -192,7 +193,7 @@ document.addEventListener("nav", async () => {
|
|||||||
pre.prepend(expandBtn)
|
pre.prepend(expandBtn)
|
||||||
|
|
||||||
// query popup container
|
// query popup container
|
||||||
const popupContainer = document.querySelector("#mermaid-container") as HTMLElement
|
const popupContainer = pre.querySelector("#mermaid-container") as HTMLElement
|
||||||
if (!popupContainer) return
|
if (!popupContainer) return
|
||||||
|
|
||||||
let panZoom: DiagramPanZoom | null = null
|
let panZoom: DiagramPanZoom | null = null
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user