This commit is contained in:
parent
98455e3b68
commit
58f1cea811
5 changed files with 9 additions and 4 deletions
|
@ -33,7 +33,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
|
|||
}
|
||||
|
||||
if (!window.siyuan.dragElement) { // https://ld246.com/article/1649638389841
|
||||
hideElements(["gutter"], protyle);
|
||||
hideElements(["gutterOnly"], protyle);
|
||||
}
|
||||
|
||||
if (protyle.scroll && !protyle.scroll.element.classList.contains("fn__none")) {
|
||||
|
|
|
@ -27,6 +27,11 @@ export const hideElements = (panels: string[], protyle?: IProtyle, focusHide = f
|
|||
item.classList.remove("protyle-wysiwyg--hl");
|
||||
});
|
||||
}
|
||||
// 不能 remove("protyle-wysiwyg--hl") 否则打开页签的时候 "cb-get-hl" 高亮会被移除
|
||||
if (protyle.gutter && panels.includes("gutterOnly")) {
|
||||
protyle.gutter.element.classList.add("fn__none");
|
||||
protyle.gutter.element.innerHTML = "";
|
||||
}
|
||||
if (protyle.toolbar && panels.includes("toolbar")) {
|
||||
protyle.toolbar.element.classList.add("fn__none");
|
||||
protyle.toolbar.element.style.display = "";
|
||||
|
|
|
@ -57,7 +57,7 @@ export const onGet = (options: {
|
|||
return;
|
||||
}
|
||||
}
|
||||
hideElements(["gutter"], options.protyle);
|
||||
hideElements(["gutterOnly"], options.protyle);
|
||||
options.protyle.block.parentID = options.data.data.parentID;
|
||||
options.protyle.block.parent2ID = options.data.data.parent2ID;
|
||||
options.protyle.block.rootID = options.data.data.rootID;
|
||||
|
|
|
@ -6,7 +6,7 @@ import {lineNumberRender} from "../render/highlightRender";
|
|||
import {stickyRow} from "../render/av/row";
|
||||
|
||||
export const resize = (protyle: IProtyle) => {
|
||||
hideElements(["gutter"], protyle);
|
||||
hideElements(["gutterOnly"], protyle)
|
||||
const abs = setPadding(protyle);
|
||||
const MIN_ABS = 4;
|
||||
// 不能 clearTimeout,否则 split 时左侧无法 resize
|
||||
|
|
|
@ -34,5 +34,5 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
|
|||
/// #endif
|
||||
resize(protyle);
|
||||
}
|
||||
hideElements(["gutter", "toolbar", "select", "hint", "util"], protyle);
|
||||
hideElements(["gutterOnly", "toolbar", "select", "hint", "util"], protyle);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue