This commit is contained in:
parent
ac24220257
commit
6738cfdac9
1 changed files with 4 additions and 8 deletions
|
@ -141,12 +141,10 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
||||||
topSourceElement = targetElement;
|
topSourceElement = targetElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
|
if (isCopy && item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
|
||||||
item.removeAttribute("fold");
|
item.removeAttribute("fold");
|
||||||
if (isCopy) {
|
|
||||||
foldHeadingIds.push({id, parentID});
|
foldHeadingIds.push({id, parentID});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
let copyId;
|
let copyId;
|
||||||
let copyElement;
|
let copyElement;
|
||||||
if (isCopy) {
|
if (isCopy) {
|
||||||
|
@ -359,12 +357,10 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
afterPreviousID = isCopy ? copyId : id;
|
afterPreviousID = isCopy ? copyId : id;
|
||||||
}
|
}
|
||||||
if (item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
|
if (isCopy && item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
|
||||||
item.removeAttribute("fold");
|
item.removeAttribute("fold");
|
||||||
if (isCopy) {
|
|
||||||
foldHeadingIds.push({id, parentID});
|
foldHeadingIds.push({id, parentID});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (isCopy) {
|
if (isCopy) {
|
||||||
undoOperations.push({
|
undoOperations.push({
|
||||||
action: "delete",
|
action: "delete",
|
||||||
|
|
Loading…
Add table
Reference in a new issue