mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-08 01:38:50 +01:00
This commit is contained in:
parent
bb781add0a
commit
c0fd1f06b8
1 changed files with 1 additions and 3 deletions
|
|
@ -316,12 +316,10 @@ export const setPadding = (protyle: IProtyle) => {
|
|||
// https://github.com/siyuan-note/siyuan/issues/15021
|
||||
protyle.element.style.setProperty("--b3-width-protyle", protyle.element.clientWidth + "px");
|
||||
protyle.element.style.setProperty("--b3-width-protyle-content", protyle.contentElement.clientWidth + "px");
|
||||
|
||||
const realWidth = protyle.wysiwyg.element.getAttribute("data-realwidth");
|
||||
const newWidth = protyle.wysiwyg.element.clientWidth - paddingLeft - paddingRight;
|
||||
protyle.wysiwyg.element.setAttribute("data-realwidth", newWidth.toString());
|
||||
protyle.element.style.setProperty("--b3-width-protyle-wysiwyg", newWidth.toString() + "px");
|
||||
|
||||
const realWidth = protyle.wysiwyg.element.getAttribute("data-realwidth");
|
||||
return {
|
||||
width: realWidth ? Math.abs(parseFloat(realWidth) - newWidth) : 0,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue