mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
b40f8c898a
commit
6f132842a7
1 changed files with 5 additions and 6 deletions
|
@ -587,15 +587,14 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
}
|
}
|
||||||
if (operation.action === "setAttrViewCardSize") {
|
if (operation.action === "setAttrViewCardSize") {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||||
const galleryElement = item.querySelector(".av__gallery") as HTMLElement;
|
item.querySelectorAll(".av__gallery").forEach(galleryItem => {
|
||||||
if (galleryElement) {
|
galleryItem.classList.remove("av__gallery--small", "av__gallery--big");
|
||||||
galleryElement.classList.remove("av__gallery--small", "av__gallery--big");
|
|
||||||
if (operation.data === 0) {
|
if (operation.data === 0) {
|
||||||
galleryElement.classList.add("av__gallery--small");
|
galleryItem.classList.add("av__gallery--small");
|
||||||
} else if (operation.data === 2) {
|
} else if (operation.data === 2) {
|
||||||
galleryElement.classList.add("av__gallery--big");
|
galleryItem.classList.add("av__gallery--big");
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue