Vanessa 2025-09-20 16:46:50 +08:00
parent f34d8022b8
commit c4aee4d601
2 changed files with 2 additions and 2 deletions

View file

@ -578,7 +578,7 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any, brea
json.blockId = layout.editor.protyle.block.id;
json.rootId = layout.editor.protyle.block.rootID;
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";
} else if (layout instanceof Asset) {
json.path = layout.path;

View file

@ -67,7 +67,7 @@ export const getDocByScroll = (options: {
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", {
id: options.scrollAttr.zoomInId,
size: Constants.SIZE_GET_MAX,