mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
816ebbc8cd
commit
9adb99364a
4 changed files with 4 additions and 15 deletions
|
|
@ -594,7 +594,7 @@ export class Dock {
|
|||
type: "pin",
|
||||
tab,
|
||||
blockId: editor?.protyle?.block?.rootID,
|
||||
isPreview: !editor?.protyle?.preview?.element.classList.contains("fn__none")
|
||||
isPreview: editor?.protyle?.preview ? editor.protyle.preview.element.classList.contains("fn__none") : false
|
||||
});
|
||||
if (editor?.protyle?.title?.editElement) {
|
||||
outline.updateDocTitle(editor.protyle?.background?.ial);
|
||||
|
|
|
|||
|
|
@ -58,17 +58,6 @@ export class MobileOutline {
|
|||
}
|
||||
|
||||
public update() {
|
||||
if (!window.siyuan.mobile.editor.protyle.preview.element.classList.contains("fn__none")) {
|
||||
const blockId = window.siyuan.mobile.editor.protyle.preview.element.querySelector(".selected")?.id;
|
||||
window.siyuan.mobile.editor.protyle.preview.render(window.siyuan.mobile.editor.protyle, (outlineData) => {
|
||||
this.tree.updateData(outlineData);
|
||||
if (blockId) {
|
||||
this.setCurrentByPreview(this.element.querySelector("#" + blockId));
|
||||
return;
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
fetchPost("/api/outline/getDocOutline", {
|
||||
id: window.siyuan.mobile.editor.protyle.block.rootID,
|
||||
preview: !window.siyuan.mobile.editor.protyle.preview.element.classList.contains("fn__none")
|
||||
|
|
|
|||
|
|
@ -191,9 +191,6 @@ export class Preview {
|
|||
avRender(protyle.preview.previewElement, protyle);
|
||||
speechRender(protyle.preview.previewElement, protyle.options.lang);
|
||||
protyle.preview.previewElement.scrollTop = oldScrollTop;
|
||||
/// #if !MOBILE
|
||||
updateOutline(getAllModels(), protyle);
|
||||
/// #endif
|
||||
loadingElement.remove();
|
||||
});
|
||||
}, protyle.options.preview.delay);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
|
|||
protyle.breadcrumb.toggleExit(true);
|
||||
}
|
||||
protyle.preview.render(protyle);
|
||||
/// #if !MOBILE
|
||||
updateOutline(getAllModels(), protyle, true);
|
||||
/// #endif
|
||||
} else if (type === "wysiwyg") {
|
||||
if (!protyle.contentElement.classList.contains("fn__none")) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue