mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 02:30:09 +08:00
This commit is contained in:
parent
07238872b6
commit
3e15e09dee
@ -71,7 +71,9 @@ export class Gutter {
|
||||
event.stopPropagation();
|
||||
const id = buttonElement.getAttribute("data-node-id");
|
||||
if (!id) {
|
||||
const gutterFold = () => {
|
||||
if (buttonElement.getAttribute("disabled")) {
|
||||
return;
|
||||
}
|
||||
buttonElement.setAttribute("disabled", "disabled");
|
||||
let foldElement: Element;
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${(buttonElement.previousElementSibling || buttonElement.nextElementSibling).getAttribute("data-node-id")}"]`)).find(item => {
|
||||
@ -84,7 +86,7 @@ export class Gutter {
|
||||
if (!foldElement) {
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.altIsPressed) {
|
||||
if (event.altKey) {
|
||||
// 折叠所有子集
|
||||
let hasFold = true;
|
||||
const oldHTML = foldElement.outerHTML;
|
||||
@ -127,13 +129,6 @@ export class Gutter {
|
||||
(buttonElement.firstElementChild as HTMLElement).style.transform = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
};
|
||||
if (buttonElement.getAttribute("disabled")) {
|
||||
return;
|
||||
}
|
||||
if (!protyle.disabled) {
|
||||
gutterFold();
|
||||
}
|
||||
hideElements(["select"], protyle);
|
||||
window.siyuan.menus.menu.remove();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user