Vanessa 2025-02-05 10:57:43 +08:00
parent 180338a86f
commit e5867b0c2e
2 changed files with 7 additions and 5 deletions

View file

@ -274,9 +274,10 @@ export class Outline extends Model {
return;
}
const selectRect = selectItem.getBoundingClientRect();
if (moveEvent.clientY > selectRect.top + selectRect.height * 3 / 4) {
const dragHeight = selectRect.height * .36;
if (moveEvent.clientY > selectRect.bottom - dragHeight) {
selectItem.classList.add("dragover__bottom");
} else if (moveEvent.clientY < selectRect.bottom - selectRect.height * 3 / 4) {
} else if (moveEvent.clientY < selectRect.top + dragHeight) {
selectItem.classList.add("dragover__top");
} else {
selectItem.classList.add("dragover");