🎨 row icon

This commit is contained in:
Vanessa 2023-11-08 12:11:16 +08:00
parent 76d18c3c52
commit 70c6dddcaa
2 changed files with 7 additions and 1 deletions

View file

@ -60,7 +60,7 @@
&__gutters {
@extend .protyle-gutters;
position: absolute;
position: fixed;
top: 0;
left: -44px;
opacity: 0;

View file

@ -1452,6 +1452,12 @@ export class WYSIWYG {
if (embedElement) {
protyle.gutter.render(protyle, embedElement, this.element);
} else {
// database 行块标
const rowElement = hasClosestByClassName(event.target, "av__row");
if (rowElement && rowElement.dataset.id) {
const rowRect = rowElement.getBoundingClientRect();
rowElement.firstElementChild.setAttribute("style", `left:${rowRect.left - 44}px;top:${rowRect.top}px`);
}
protyle.gutter.render(protyle, nodeElement, this.element);
}
}