Vanessa 2025-03-25 23:55:14 +08:00
parent 5a69b30883
commit 69642e3bac

View File

@ -520,11 +520,10 @@ export class Files extends Model {
return;
}
const notebookSort = notebookElement.getAttribute("data-sortmode");
if ((
notebookSort === "6" || (window.siyuan.config.fileTree.sort === 6 && notebookSort === "15")
) &&
// 防止文档拖拽到笔记本外
!(!sourceOnlyRoot && targetType === "navigation-root")) {
if ((sourceOnlyRoot && targetType === "navigation-root" && window.siyuan.config.fileTree.sort === 6) ||
(!sourceOnlyRoot && targetType !== "navigation-root" &&
(notebookSort === "6" || (window.siyuan.config.fileTree.sort === 6 && notebookSort === "15")))
) {
const nodeRect = liElement.getBoundingClientRect();
const dragHeight = nodeRect.height * .2;
if (targetType === "navigation-root" && sourceOnlyRoot) {