mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
caea24b62b
commit
70aa089372
1 changed files with 13 additions and 10 deletions
|
|
@ -411,13 +411,16 @@ export const resizeDrag = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let resizeTimeout: number;
|
||||||
export const resizeTabs = () => {
|
export const resizeTabs = () => {
|
||||||
const models = getAllModels();
|
clearTimeout(resizeTimeout);
|
||||||
models.editor.forEach((item) => {
|
// .layout .fn__flex-shrink {width .15s cubic-bezier(0, 0, .2, 1) 0ms} 时需要再次计算 padding
|
||||||
if (item.editor && item.editor.protyle && item.element.parentElement) {
|
// PDF 避免分屏多次调用后,页码跳转到1 https://github.com/siyuan-note/siyuan/issues/5646
|
||||||
hideElements(["gutter"], item.editor.protyle);
|
resizeTimeout = window.setTimeout(() => {
|
||||||
setTimeout(() => {
|
const models = getAllModels();
|
||||||
// .layout .fn__flex-shrink {width .15s cubic-bezier(0, 0, .2, 1) 0ms} 时需要再次计算 padding
|
models.editor.forEach((item) => {
|
||||||
|
if (item.editor && item.editor.protyle && item.element.parentElement) {
|
||||||
|
hideElements(["gutter"], item.editor.protyle);
|
||||||
setPadding(item.editor.protyle);
|
setPadding(item.editor.protyle);
|
||||||
if (typeof echarts !== "undefined") {
|
if (typeof echarts !== "undefined") {
|
||||||
item.editor.protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
|
item.editor.protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
|
||||||
|
|
@ -427,10 +430,10 @@ export const resizeTabs = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 200);
|
}
|
||||||
}
|
});
|
||||||
});
|
pdfResize();
|
||||||
pdfResize();
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const copyTab = (tab: Tab) => {
|
export const copyTab = (tab: Tab) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue