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,16 +587,15 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
}
|
||||
if (operation.action === "setAttrViewCardSize") {
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||
const galleryElement = item.querySelector(".av__gallery") as HTMLElement;
|
||||
if (galleryElement) {
|
||||
galleryElement.classList.remove("av__gallery--small", "av__gallery--big");
|
||||
item.querySelectorAll(".av__gallery").forEach(galleryItem => {
|
||||
galleryItem.classList.remove("av__gallery--small", "av__gallery--big");
|
||||
if (operation.data === 0) {
|
||||
galleryElement.classList.add("av__gallery--small");
|
||||
galleryItem.classList.add("av__gallery--small");
|
||||
} else if (operation.data === 2) {
|
||||
galleryElement.classList.add("av__gallery--big");
|
||||
}
|
||||
galleryItem.classList.add("av__gallery--big");
|
||||
}
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (operation.action === "setAttrViewCardAspectRatio") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue