mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-09 07:00:53 +08:00
This commit is contained in:
parent
3ff902e547
commit
d173f26d35
@ -573,7 +573,16 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
|||||||
// 跨文档不支持撤销
|
// 跨文档不支持撤销
|
||||||
transaction(protyle, doOperations);
|
transaction(protyle, doOperations);
|
||||||
}
|
}
|
||||||
if (direct === "col" && (sourceElements.length > 1 || hasFoldHeading) && !isCopy) {
|
if (!isCopy && direct === "col") {
|
||||||
|
if (targetElement.getAttribute("data-type") === "NodeHeading" && targetElement.getAttribute("fold") === "1") {
|
||||||
|
turnsIntoOneTransaction({
|
||||||
|
protyle,
|
||||||
|
selectsElement: [targetElement],
|
||||||
|
type: "BlocksMergeSuperBlock",
|
||||||
|
level: "row"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if ((sourceElements.length > 1 || hasFoldHeading)) {
|
||||||
turnsIntoOneTransaction({
|
turnsIntoOneTransaction({
|
||||||
protyle,
|
protyle,
|
||||||
selectsElement: sourceElements.reverse(),
|
selectsElement: sourceElements.reverse(),
|
||||||
@ -581,6 +590,7 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
|||||||
level: "row"
|
level: "row"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
focusBlock(sourceElements[0]);
|
focusBlock(sourceElements[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user