This commit is contained in:
Vanessa 2022-11-12 23:55:10 +08:00
parent d299e36b9f
commit d74f49a8ef

View file

@ -90,8 +90,12 @@ export const setPadding = (protyle: IProtyle) => {
let min16 = 16; let min16 = 16;
let min24 = 24; let min24 = 24;
if (!isMobile()) { if (!isMobile()) {
const padding = (protyle.element.clientWidth - Constants.SIZE_EDITOR_WIDTH) / 2; let padding = (protyle.element.clientWidth - Constants.SIZE_EDITOR_WIDTH) / 2;
if (!window.siyuan.config.editor.fullWidth && padding > 96) { if (!window.siyuan.config.editor.fullWidth && padding > 96) {
if (padding > Constants.SIZE_EDITOR_WIDTH) {
// 超宽屏调整 https://ld246.com/article/1668266637363
padding = protyle.element.clientWidth / 3
}
min16 = padding; min16 = padding;
min24 = padding; min24 = padding;
} else if (protyle.element.clientWidth > Constants.SIZE_EDITOR_WIDTH) { } else if (protyle.element.clientWidth > Constants.SIZE_EDITOR_WIDTH) {