Skip to content

Commit

Permalink
🎨 #9294
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Sep 27, 2023
1 parent bef5a71 commit 7ee6c7e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/src/protyle/gutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,16 @@ export class Gutter {
(rect.height > Math.floor(window.siyuan.config.editor.fontSize * 1.625) + 8 && rect.height < Math.floor(window.siyuan.config.editor.fontSize * 1.625) * 2 + 8)) {
marginHeight = (rect.height - this.element.clientHeight) / 2;
}
this.element.style.top = `${Math.max(rect.top, wysiwyg.parentElement.getBoundingClientRect().top) + marginHeight}px`;
if (nodeElement.getAttribute("data-type") === "NodeAttributeView") {
const iconElement = nodeElement.querySelector(".item__graphic");
if (iconElement) {
this.element.style.top = `${iconElement.getBoundingClientRect().top - (window.siyuan.config.editor.fontSize * 1.625 - 14) / 2}px`;
} else {
this.element.style.top = `${Math.max(rect.top, wysiwyg.parentElement.getBoundingClientRect().top) + 8}px`;
}
} else {
this.element.style.top = `${Math.max(rect.top, wysiwyg.parentElement.getBoundingClientRect().top) + marginHeight}px`;
}
let left = rect.left - this.element.clientWidth - space;
if (nodeElement.getAttribute("data-type") === "NodeBlockQueryEmbed" && this.element.childElementCount === 1) {
// 嵌入块为列表时
Expand Down

0 comments on commit 7ee6c7e

Please sign in to comment.