Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 13, 2023
1 parent 51f6687 commit fd94e9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
}
let time: number;
if (e.firstElementChild.innerHTML === "") {
e.style.width = e.parentElement.clientWidth - parseInt(e.parentElement.style.paddingLeft || "0") - parseInt(e.parentElement.style.paddingRight || "0") + "px";
e.style.alignSelf = "";
time = new Date().getTime();
let html = "";
[1, 2, 3].forEach(() => {
Expand Down Expand Up @@ -171,10 +171,6 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
});
const paddingLeft = e.parentElement.style.paddingLeft;
const paddingRight = e.parentElement.style.paddingRight;
if (e.parentElement.clientWidth > 0) {
e.style.width = e.parentElement.clientWidth + "px";
}
e.style.alignSelf = "center";
setTimeout(() => {
e.firstElementChild.outerHTML = `<div>
<div class="av__header" style="padding-left: ${paddingLeft};padding-right: ${paddingRight};">
Expand Down Expand Up @@ -208,6 +204,10 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
</div>
</div>
</div>`;
if (e.parentElement.clientWidth > 0) {
e.style.width = e.parentElement.clientWidth + "px";
}
e.style.alignSelf = "center";
e.setAttribute("data-render", "true");
if (left) {
e.querySelector(".av__scroll").scrollLeft = left;
Expand Down

0 comments on commit fd94e9d

Please sign in to comment.