Skip to content

Commit

Permalink
💄 fix #10731
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Mar 28, 2024
1 parent 5429380 commit df6ee06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/protyle/gutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2139,10 +2139,12 @@ data-type="fold"><svg style="width:10px${fold && fold === "1" ? "" : ";transform
}
this.element.style.top = `${Math.max(rect.top, contentTop) + marginHeight}px`;
let left = rect.left - this.element.clientWidth - space;
if ((nodeElement.getAttribute("data-type") === "NodeBlockQueryEmbed" && this.element.childElementCount === 1) || // 嵌入块为列表时
// 为数据库行
element.classList.contains("av__row")) {
if ((nodeElement.getAttribute("data-type") === "NodeBlockQueryEmbed" && this.element.childElementCount === 1)) {
// 嵌入块为列表时
left = nodeElement.getBoundingClientRect().left - this.element.clientWidth - space;
} else if (element.classList.contains("av__row")) {
// 为数据库行
left = nodeElement.getBoundingClientRect().left - this.element.clientWidth - space + parseInt(getComputedStyle(nodeElement).paddingLeft);
}
this.element.style.left = `${left}px`;
if (left < this.element.parentElement.getBoundingClientRect().left) {
Expand Down

0 comments on commit df6ee06

Please sign in to comment.