Skip to content

Commit c0fd1f0

Browse files
committed
♻️ #15043
1 parent bb781ad commit c0fd1f0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

app/src/protyle/ui/initUI.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,10 @@ export const setPadding = (protyle: IProtyle) => {
316316
// https://github.com/siyuan-note/siyuan/issues/15021
317317
protyle.element.style.setProperty("--b3-width-protyle", protyle.element.clientWidth + "px");
318318
protyle.element.style.setProperty("--b3-width-protyle-content", protyle.contentElement.clientWidth + "px");
319-
319+
const realWidth = protyle.wysiwyg.element.getAttribute("data-realwidth");
320320
const newWidth = protyle.wysiwyg.element.clientWidth - paddingLeft - paddingRight;
321321
protyle.wysiwyg.element.setAttribute("data-realwidth", newWidth.toString());
322322
protyle.element.style.setProperty("--b3-width-protyle-wysiwyg", newWidth.toString() + "px");
323-
324-
const realWidth = protyle.wysiwyg.element.getAttribute("data-realwidth");
325323
return {
326324
width: realWidth ? Math.abs(parseFloat(realWidth) - newWidth) : 0,
327325
};

0 commit comments

Comments
 (0)