|
@@ -110,16 +110,17 @@ export const initUI = (vditor: IVditor) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const setPadding = (vditor: IVditor) => {
|
|
export const setPadding = (vditor: IVditor) => {
|
|
|
|
|
+ const minPadding = window.innerWidth <= 520 ? 10 : 35;
|
|
|
if (vditor.wysiwyg.element.parentElement.style.display !== "none") {
|
|
if (vditor.wysiwyg.element.parentElement.style.display !== "none") {
|
|
|
const padding = (vditor.wysiwyg.element.parentElement.clientWidth
|
|
const padding = (vditor.wysiwyg.element.parentElement.clientWidth
|
|
|
- vditor.options.preview.maxWidth) / 2;
|
|
- vditor.options.preview.maxWidth) / 2;
|
|
|
- vditor.wysiwyg.element.style.padding = `10px ${Math.max(35, padding)}px`;
|
|
|
|
|
|
|
+ vditor.wysiwyg.element.style.padding = `10px ${Math.max(minPadding, padding)}px`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (vditor.ir.element.parentElement.style.display !== "none") {
|
|
if (vditor.ir.element.parentElement.style.display !== "none") {
|
|
|
const padding = (vditor.ir.element.parentElement.clientWidth
|
|
const padding = (vditor.ir.element.parentElement.clientWidth
|
|
|
- vditor.options.preview.maxWidth) / 2;
|
|
- vditor.options.preview.maxWidth) / 2;
|
|
|
- vditor.ir.element.style.padding = `10px ${Math.max(35, padding)}px`;
|
|
|
|
|
|
|
+ vditor.ir.element.style.padding = `10px ${Math.max(minPadding, padding)}px`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let outlineWidth = 0;
|
|
let outlineWidth = 0;
|