From 6521d4c537427f18e110a6e01a47fcb6c908fea0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 19 Apr 2024 20:47:06 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/11087 --- app/src/layout/dock/Graph.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts index ee943f5c9..0a372c1d6 100644 --- a/app/src/layout/dock/Graph.ts +++ b/app/src/layout/dock/Graph.ts @@ -319,7 +319,7 @@ export class Graph extends Model { target.previousElementSibling.classList.remove("fn__none"); (target.previousElementSibling as HTMLInputElement).select(); } else if (dataType === "refresh") { - this.searchGraph(false); + this.searchGraph(false, undefined, true); } else if (dataType === "fullscreen") { fullscreen(this.element, target); } @@ -406,7 +406,7 @@ export class Graph extends Model { this.searchGraph(false); } - public searchGraph(focus: boolean, id?: string) { + public searchGraph(focus: boolean, id?: string, refresh = false) { const element = this.element.querySelector('.block__icon[data-type="refresh"] svg'); if (element.classList.contains("fn__rotate") && !id) { return; @@ -465,7 +465,7 @@ export class Graph extends Model { if (id) { this.blockId = id; } - if (this.blockId && !isCurrentEditor(this.blockId) && this.type === "pin") { + if (!refresh && this.type === "pin" && this.blockId && !isCurrentEditor(this.blockId)) { return; } this.graphData = response.data;