An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Prevent bottom backlink title tooltips from overlapping https://github.com/siyuan-note/siyuan/issues/18464
Daniel8a06b15376bf
diff --git a/app/src/layout/dock/Backlink.ts b/app/src/layout/dock/Backlink.tsindex 8f4ee9917e..015af14550 100644--- a/app/src/layout/dock/Backlink.ts+++ b/app/src/layout/dock/Backlink.ts@@ -239,6 +239,7 @@ export class Backlink extends Model {this.tree = new Tree({element: this.element.querySelector(".backlinkList") as HTMLElement,data: null,+ titleTooltipPosition: this.type === "bottom" ? "north" : "parentE",click: (element) => {this.toggleItem(element, false);this.setFocus();@@ -279,6 +280,7 @@ export class Backlink extends Model {this.mTree = new Tree({element: this.element.querySelector(".backlinkMList") as HTMLElement,data: null,+ titleTooltipPosition: this.type === "bottom" ? "north" : "parentE",click: (element) => {this.toggleItem(element, true);this.setFocus();diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.tsindex deb91b2f70..7d2d37b41f 100644--- a/app/src/util/Tree.ts+++ b/app/src/util/Tree.ts@@ -11,6 +11,7 @@ export class Tree {private data: IBlockTree[];private blockExtHTML: string;private topExtHTML: string;+ private titleTooltipPosition: string;private blockDraggable: boolean;private dragStart: (element: HTMLElement, event: DragEvent) => boolean;private dragEnd: (element: HTMLElement, event: DragEvent) => boolean;@@ -27,6 +28,7 @@ export class Tree {data: IBlockTree[],blockExtHTML?: string,topExtHTML?: string,+ titleTooltipPosition?: string,blockDraggable?: boolean,click?(element: HTMLElement, event: MouseEvent): voidctrlClick?(element: HTMLElement, event: MouseEvent): void@@ -46,6 +48,7 @@ export class Tree {this.element = options.element;this.blockExtHTML = options.blockExtHTML;this.topExtHTML = options.topExtHTML;+ this.titleTooltipPosition = options.titleTooltipPosition || "parentE";this.blockDraggable = options.blockDraggable;this.dragStart = options.dragStart;this.dragEnd = options.dragEnd;@@ -118,7 +121,7 @@ ${item.label !== undefined && item.label !== null ? `data-label='${item.label}'`</span>${iconHTML}${numberHTML}- <span class="b3-list-item__text ariaLabel" data-position="parentE"${titleTip}>${item.name}</span>+ <span class="b3-list-item__text ariaLabel" data-position="${this.titleTooltipPosition}"${titleTip}>${item.name}</span>${this.topExtHTML || ""}${countHTML}</li>`;@@ -181,7 +184,7 @@ data-def-path="${item.defPath}"></span>${iconHTML}${numberHTML}- <span class="b3-list-item__text ariaLabel" data-position="parentE" ${type === "outline" ? ' aria-label="' + escapeAriaLabel(Lute.BlockDOM2Content(item.content)) + '"' : ""}>${item.content}</span>+ <span class="b3-list-item__text ariaLabel" data-position="${this.titleTooltipPosition}" ${type === "outline" ? ' aria-label="' + escapeAriaLabel(Lute.BlockDOM2Content(item.content)) + '"' : ""}>${item.content}</span>${this.blockExtHTML || ""}${countHTML}</li>`;