mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
e9b41d881c
commit
a76c29f5c9
1 changed files with 9 additions and 7 deletions
|
|
@ -659,14 +659,16 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
if (operation.action === "foldAttrViewGroup") {
|
if (operation.action === "foldAttrViewGroup") {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`.av[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
Array.from(protyle.wysiwyg.element.querySelectorAll(`.av[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||||
const foldElement = item.querySelector(`[data-type="av-group-fold"][data-id="${operation.id}"]`);
|
const foldElement = item.querySelector(`[data-type="av-group-fold"][data-id="${operation.id}"]`);
|
||||||
if (operation.data) {
|
if (foldElement) {
|
||||||
foldElement.firstElementChild.classList.remove("av__group-arrow--open");
|
if (operation.data) {
|
||||||
foldElement.parentElement.nextElementSibling.classList.add("fn__none");
|
foldElement.firstElementChild.classList.remove("av__group-arrow--open");
|
||||||
} else {
|
foldElement.parentElement.nextElementSibling.classList.add("fn__none");
|
||||||
foldElement.firstElementChild.classList.add("av__group-arrow--open");
|
} else {
|
||||||
foldElement.parentElement.nextElementSibling.classList.remove("fn__none");
|
foldElement.firstElementChild.classList.add("av__group-arrow--open");
|
||||||
|
foldElement.parentElement.nextElementSibling.classList.remove("fn__none");
|
||||||
|
}
|
||||||
|
foldElement.removeAttribute("data-folding");
|
||||||
}
|
}
|
||||||
foldElement.removeAttribute("data-folding");
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue