From e39bf3503f68665131eaefc58fef4f8713ea27b3 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 8 Feb 2023 18:31:31 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7176 --- app/src/layout/dock/Graph.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts index f20a7a9a8..e2891bf85 100644 --- a/app/src/layout/dock/Graph.ts +++ b/app/src/layout/dock/Graph.ts @@ -8,6 +8,7 @@ import {fullscreen} from "../../protyle/breadcrumb/action"; import {fetchPost} from "../../util/fetch"; import {isCurrentEditor, openFileById} from "../../editor/util"; import {updateHotkeyTip} from "../../protyle/util/compatibility"; +import {openGlobalSearch} from "../../search/util"; declare const vis: any; @@ -21,7 +22,7 @@ export class Graph extends Model { public rootId: string; // "local" 必填 private timeout: number; public graphData: { - nodes: { box: string, id: string, path: string }[], + nodes: { box: string, id: string, path: string, type: string }[], links: Record[], box: string }; @@ -591,6 +592,10 @@ export class Graph extends Model { if (!node) { return; } + if (node.type === "textmark tag") { + openGlobalSearch(`#${node.id}#`, !window.siyuan.ctrlIsPressed); + return; + } if (window.siyuan.shiftIsPressed) { openFileById({ id: node.id,