mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
This commit is contained in:
parent
5429380c36
commit
df6ee063a3
1 changed files with 5 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue