Vanessa 2023-06-11 10:22:05 +08:00
parent 1b9e2fe35d
commit 8b6a29b32c
4 changed files with 12 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

View file

@ -1,4 +1,6 @@
.av {
user-select: none;
&__mask {
position: fixed;
z-index: 320;

View file

@ -1403,7 +1403,7 @@ export class Gutter {
window.siyuan.menus.menu.append(new MenuItem({
accelerator: `${updateHotkeyTip(window.siyuan.config.keymap.general.enter.custom)}/${updateHotkeyTip("⌘Click")}`,
label: window.siyuan.languages.enter,
click:()=> {
click: () => {
zoomOut({protyle, id});
}
}).element);
@ -1425,7 +1425,7 @@ export class Gutter {
/// #endif
}
} else {
zoomOut({protyle, id:protyle.block.parent2ID, focusId:id});
zoomOut({protyle, id: protyle.block.parent2ID, focusId: id});
}
}
}).element);
@ -1883,6 +1883,8 @@ export class Gutter {
if (nodeElement.getAttribute("data-type") === "NodeBlockQueryEmbed" && this.element.childElementCount === 1) {
// 嵌入块为列表时
left = nodeElement.getBoundingClientRect().left - this.element.clientWidth - space;
} else if (nodeElement.getAttribute("data-type") === "NodeAttributeView") {
left = left + (parseInt((nodeElement.firstElementChild.firstElementChild as HTMLElement)?.style.paddingLeft) || 0);
}
this.element.style.left = `${left}px`;
if (left < this.element.parentElement.getBoundingClientRect().left) {

View file

@ -55,13 +55,13 @@ export const avRender = (element: Element) => {
});
tableHTML += "<div></div></div>";
});
const paddingLeft = e.parentElement.style.paddingLeft;
const paddingRight = e.parentElement.style.paddingRight;
// 10: ::-webkit-scrollbar width
e.style.width = (e.parentElement.clientWidth - 10) + "px";
const paddingLeft = parseInt(e.parentElement.style.paddingLeft) - 20;
const paddingRight = parseInt(e.parentElement.style.paddingRight) - 20
// 48: padding for gutter icon
e.style.width = (e.parentElement.clientWidth - 48) + "px";
e.style.alignSelf = "center";
e.firstElementChild.outerHTML = `<div>
<div style="padding-left: ${paddingLeft};padding-right: ${paddingRight}">
<div style="padding-left: ${paddingLeft}px;padding-right: ${paddingRight}px">
<div>
<div>tab1</div>
</div>
@ -70,7 +70,7 @@ export const avRender = (element: Element) => {
</div>
</div>
<div class="av__scroll">
<div style="padding-left: ${paddingLeft};padding-right: ${paddingRight};float: left;">
<div style="padding-left: ${paddingLeft}px;padding-right: ${paddingRight}px;float: left;">
${tableHTML}
<div class="block__icon block__icon--show">
<div class="fn__space"></div>