mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 attr in database
This commit is contained in:
parent
8f4bc20864
commit
a2e4e2288e
1 changed files with 3 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ export const resizeAV = (item: HTMLElement) => {
|
||||||
if (!item.classList.contains("av") || item.getAttribute("data-render") !== "true") {
|
if (!item.classList.contains("av") || item.getAttribute("data-render") !== "true") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const attrElement = item.querySelector(".protyle-attr") as HTMLElement
|
||||||
if (item.style.width.endsWith("%") || item.style.margin) {
|
if (item.style.width.endsWith("%") || item.style.margin) {
|
||||||
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;
|
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;
|
||||||
avHeaderElement.style.paddingLeft = "";
|
avHeaderElement.style.paddingLeft = "";
|
||||||
|
|
@ -61,6 +62,7 @@ export const resizeAV = (item: HTMLElement) => {
|
||||||
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
|
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
|
||||||
avBodyElement.style.paddingLeft = "";
|
avBodyElement.style.paddingLeft = "";
|
||||||
avBodyElement.style.paddingRight = "";
|
avBodyElement.style.paddingRight = "";
|
||||||
|
attrElement.style.paddingRight = "";
|
||||||
item.style.alignSelf = "";
|
item.style.alignSelf = "";
|
||||||
if (!item.style.width.endsWith("%")) {
|
if (!item.style.width.endsWith("%")) {
|
||||||
item.style.width = "";
|
item.style.width = "";
|
||||||
|
|
@ -75,6 +77,7 @@ export const resizeAV = (item: HTMLElement) => {
|
||||||
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
|
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
|
||||||
avBodyElement.style.paddingLeft = paddingLeft;
|
avBodyElement.style.paddingLeft = paddingLeft;
|
||||||
avBodyElement.style.paddingRight = paddingRight;
|
avBodyElement.style.paddingRight = paddingRight;
|
||||||
|
attrElement.style.paddingRight = paddingRight;
|
||||||
item.style.alignSelf = "center";
|
item.style.alignSelf = "center";
|
||||||
if (item.parentElement.clientWidth > 0) {
|
if (item.parentElement.clientWidth > 0) {
|
||||||
item.style.width = item.parentElement.clientWidth + "px";
|
item.style.width = item.parentElement.clientWidth + "px";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue