mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
f34d8022b8
commit
c4aee4d601
2 changed files with 2 additions and 2 deletions
|
@ -578,7 +578,7 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any, brea
|
||||||
json.blockId = layout.editor.protyle.block.id;
|
json.blockId = layout.editor.protyle.block.id;
|
||||||
json.rootId = layout.editor.protyle.block.rootID;
|
json.rootId = layout.editor.protyle.block.rootID;
|
||||||
json.mode = layout.editor.protyle.preview.element.classList.contains("fn__none") ? "wysiwyg" : "preview";
|
json.mode = layout.editor.protyle.preview.element.classList.contains("fn__none") ? "wysiwyg" : "preview";
|
||||||
json.action = layout.editor.protyle.block.showAll ? Constants.CB_GET_ALL : Constants.CB_GET_SCROLL;
|
json.action = (layout.editor.protyle.block.showAll && layout.editor.protyle.block.id !== layout.editor.protyle.block.rootID) ? Constants.CB_GET_ALL : Constants.CB_GET_SCROLL;
|
||||||
json.instance = "Editor";
|
json.instance = "Editor";
|
||||||
} else if (layout instanceof Asset) {
|
} else if (layout instanceof Asset) {
|
||||||
json.path = layout.path;
|
json.path = layout.path;
|
||||||
|
|
|
@ -67,7 +67,7 @@ export const getDocByScroll = (options: {
|
||||||
actions = [Constants.CB_GET_UNUNDO];
|
actions = [Constants.CB_GET_UNUNDO];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.scrollAttr?.zoomInId) {
|
if (options.scrollAttr?.zoomInId && options.scrollAttr?.rootId && options.scrollAttr.zoomInId !== options.scrollAttr.rootId) {
|
||||||
fetchPost("/api/filetree/getDoc", {
|
fetchPost("/api/filetree/getDoc", {
|
||||||
id: options.scrollAttr.zoomInId,
|
id: options.scrollAttr.zoomInId,
|
||||||
size: Constants.SIZE_GET_MAX,
|
size: Constants.SIZE_GET_MAX,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue