mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
This commit is contained in:
parent
2d114d4c3b
commit
0049c49158
7 changed files with 45 additions and 21 deletions
|
|
@ -29,6 +29,7 @@ import {sendGlobalShortcut} from "./globalEvent/keydown";
|
|||
import {closeWindow} from "../window/closeWin";
|
||||
import {checkFold} from "../util/noRelyPCFunction";
|
||||
import {correctHotkey} from "./globalEvent/commonHotkey";
|
||||
import {recordBeforeResizeTop} from "../protyle/util/resize";
|
||||
|
||||
export const onGetConfig = (isStart: boolean, app: App) => {
|
||||
correctHotkey(app);
|
||||
|
|
@ -67,12 +68,18 @@ export const onGetConfig = (isStart: boolean, app: App) => {
|
|||
setInlineStyle();
|
||||
renderSnippet();
|
||||
let resizeTimeout = 0;
|
||||
let firstResize = true;
|
||||
window.addEventListener("resize", () => {
|
||||
if (firstResize) {
|
||||
recordBeforeResizeTop();
|
||||
firstResize = false;
|
||||
}
|
||||
window.clearTimeout(resizeTimeout);
|
||||
resizeTimeout = window.setTimeout(() => {
|
||||
adjustLayout();
|
||||
resizeTabs();
|
||||
resizeTopBar();
|
||||
firstResize = true;
|
||||
}, 200);
|
||||
});
|
||||
addGA();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue