mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-06 22:32:41 +08:00
This commit is contained in:
parent
7509c10ed6
commit
441b6f7f65
@ -1132,15 +1132,28 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||||||
blockElement.setAttribute("updated", newUpdated);
|
blockElement.setAttribute("updated", newUpdated);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < ids.length; i++) {
|
if (targetElement.classList.contains("dragover__bottom")) {
|
||||||
|
for (let i = ids.length - 1; i > -1; i--) {
|
||||||
if (ids[i]) {
|
if (ids[i]) {
|
||||||
await fetchSyncPost("/api/filetree/doc2Heading", {
|
await fetchSyncPost("/api/filetree/doc2Heading", {
|
||||||
srcID: ids[i],
|
srcID: ids[i],
|
||||||
after: targetElement.classList.contains("dragover__bottom"),
|
after: true,
|
||||||
targetID: targetElement.getAttribute("data-node-id"),
|
targetID: targetElement.getAttribute("data-node-id"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < ids.length; i++) {
|
||||||
|
if (ids[i]) {
|
||||||
|
await fetchSyncPost("/api/filetree/doc2Heading", {
|
||||||
|
srcID: ids[i],
|
||||||
|
after: false,
|
||||||
|
targetID: targetElement.getAttribute("data-node-id"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fetchPost("/api/filetree/getDoc", {
|
fetchPost("/api/filetree/getDoc", {
|
||||||
id: protyle.block.id,
|
id: protyle.block.id,
|
||||||
size: window.siyuan.config.editor.dynamicLoadBlocks,
|
size: window.siyuan.config.editor.dynamicLoadBlocks,
|
||||||
|
Loading…
Reference in New Issue
Block a user