mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 10:30:45 +08:00
This commit is contained in:
parent
aa43b29a4f
commit
dd42ff42c7
@ -204,7 +204,6 @@ export class Gutter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
buttonElement.parentElement.querySelector("[data-type='fold'] > svg")?.setAttribute("style", `width: 10px${hasFold ? ";transform:rotate(90deg)" : ""}`);
|
|
||||||
const doOperations: IOperation[] = [];
|
const doOperations: IOperation[] = [];
|
||||||
const undoOperations: IOperation[] = [];
|
const undoOperations: IOperation[] = [];
|
||||||
Array.from(foldElement.children).forEach((ulElement) => {
|
Array.from(foldElement.children).forEach((ulElement) => {
|
||||||
@ -353,7 +352,7 @@ export class Gutter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
buttonElement.parentElement.querySelector("[data-type='fold'] > svg")?.setAttribute("style", `width: 10px${hasFold ? ";transform:rotate(90deg)" : ""}`);
|
(buttonElement.parentElement.querySelector("[data-type='fold'] > svg") as HTMLElement).style.transform = hasFold ? "rotate(90deg)" : "";
|
||||||
const doOperations: IOperation[] = [];
|
const doOperations: IOperation[] = [];
|
||||||
const undoOperations: IOperation[] = [];
|
const undoOperations: IOperation[] = [];
|
||||||
Array.from(foldElement.parentElement.children).find((listItemElement) => {
|
Array.from(foldElement.parentElement.children).find((listItemElement) => {
|
||||||
@ -378,7 +377,11 @@ export class Gutter {
|
|||||||
});
|
});
|
||||||
transaction(protyle, doOperations, undoOperations);
|
transaction(protyle, doOperations, undoOperations);
|
||||||
} else {
|
} else {
|
||||||
setFold(protyle, foldElement);
|
const hasFold = setFold(protyle, foldElement);
|
||||||
|
const foldArrowElement = buttonElement.parentElement.querySelector("[data-type='fold'] > svg") as HTMLElement
|
||||||
|
if (hasFold !== -1 && foldArrowElement) {
|
||||||
|
foldArrowElement.style.transform = hasFold === 0 ? "rotate(90deg)" : "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foldElement.classList.remove("protyle-wysiwyg--hl");
|
foldElement.classList.remove("protyle-wysiwyg--hl");
|
||||||
} else if (window.siyuan.shiftIsPressed && !protyle.disabled) {
|
} else if (window.siyuan.shiftIsPressed && !protyle.disabled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user