mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
22186cdb9d
commit
4518752f29
1 changed files with 3 additions and 3 deletions
|
|
@ -816,9 +816,9 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
const blockElement = hasClosestBlock(targetElement);
|
const blockElement = hasClosestBlock(targetElement);
|
||||||
if (blockElement) {
|
if (blockElement) {
|
||||||
let previousID = "";
|
let previousID = "";
|
||||||
if (targetClass.includes("dragover__right") || targetElement.classList.contains("dragover__bottom")) {
|
if (targetClass.includes("dragover__right") || targetClass.includes("dragover__bottom")) {
|
||||||
previousID = targetElement.getAttribute("data-id") || "";
|
previousID = targetElement.getAttribute("data-id") || "";
|
||||||
} else if (targetElement.classList.contains("dragover__top") || targetElement.classList.contains("dragover__left")) {
|
} else if (targetClass.includes("dragover__top") || targetClass.includes("dragover__left")) {
|
||||||
previousID = targetElement.previousElementSibling?.getAttribute("data-id") || "";
|
previousID = targetElement.previousElementSibling?.getAttribute("data-id") || "";
|
||||||
}
|
}
|
||||||
const avID = blockElement.getAttribute("data-av-id");
|
const avID = blockElement.getAttribute("data-av-id");
|
||||||
|
|
@ -1372,7 +1372,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
}
|
}
|
||||||
if (targetElement.classList.contains("av__gallery-add")) {
|
if (targetElement.classList.contains("av__gallery-add")) {
|
||||||
if (hasClosestByClassName(targetElement, "av__kanban-group")) {
|
if (hasClosestByClassName(targetElement, "av__kanban-group")) {
|
||||||
targetElement.classList.add("dragover__bottom");
|
targetElement.classList.add("dragover__top");
|
||||||
} else {
|
} else {
|
||||||
targetElement.classList.add("dragover__left");
|
targetElement.classList.add("dragover__left");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue