Vanessa 2025-07-01 13:56:21 +08:00
parent 863bd7d78a
commit 2b3ddced33
4 changed files with 9 additions and 23 deletions

View file

@ -27,10 +27,10 @@
overflow-x: auto;
overflow-y: hidden;
cursor: auto;
}
&[data-av-type="gallery"] > .av__container {
overflow: inherit;
&.fn__block {
overflow: visible;
}
}
&__pulse {

View file

@ -622,14 +622,6 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
}
});
if (data["data-av-type"]) {
// https://github.com/siyuan-note/siyuan/pull/15178#discussion_r2173842215
const oldAvType = item.getAttribute("data-av-type");
const containerElement = item.querySelector(".av__container") as HTMLElement;
if (containerElement && data["data-av-type"] === "table" && oldAvType === "gallery") {
containerElement.style.overflow = "inherit";
} else if (containerElement && data["data-av-type"] === "gallery" && oldAvType === "table") {
containerElement.style.overflow = "";
}
item.setAttribute("data-av-type", data["data-av-type"]);
}
const attrElements = item.querySelectorAll(".protyle-attr");