Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and appdev committed Oct 31, 2023
1 parent c5e1d2a commit 626e98e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/block/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down Expand Up @@ -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,
})
}
})
}
}
};
Expand Down

0 comments on commit 626e98e

Please sign in to comment.