This commit is contained in:
Vanessa 2023-10-28 16:34:44 +08:00
parent e1a824a71d
commit 8eb83b1604

View file

@ -7,6 +7,8 @@ import {scrollCenter} from "../util/highlightById";
import {Constants} from "../constants";
import {hideElements} from "../protyle/ui/hideElements";
import {blockRender} from "../protyle/render/blockRender";
import {fetchPost} from "../util/fetch";
import {zoomOut} from "../menus/protyle";
export const cancelSB = (protyle: IProtyle, nodeElement: Element) => {
const doOperations: IOperation[] = [];
@ -80,6 +82,15 @@ export const jumpToParentNext = (protyle: IProtyle, nodeElement: Element) => {
if (nextElement) {
focusBlock(nextElement);
scrollCenter(protyle, nextElement);
} else {
fetchPost("/api/block/getParentNextChildID", {id: nodeElement.getAttribute("data-node-id")}, (response) => {
if (response.data.id) {
zoomOut({
protyle,
id: response.data.id,
})
}
})
}
}
};