Vanessa 2025-06-17 19:14:00 +08:00
parent 3a991f8075
commit 06abf29c27
6 changed files with 81 additions and 13 deletions

View file

@ -46,7 +46,7 @@ import {openCalcMenu} from "./calc";
import {escapeAttr, escapeHtml} from "../../../util/escape";
import {Dialog} from "../../../dialog";
import {bindLayoutEvent, getLayoutHTML, updateLayout} from "./layout";
import {setGalleryCover, setGallerySize} from "./gallery/util";
import {setGalleryCover, setGalleryRatio, setGallerySize} from "./gallery/util";
export const openMenuPanel = (options: {
protyle: IProtyle,
@ -1394,6 +1394,16 @@ export const openMenuPanel = (options: {
event.preventDefault();
event.stopPropagation();
break;
} else if (type === "set-gallery-ratio") {
setGalleryRatio({
target,
protyle: options.protyle,
nodeElement: options.blockElement,
view: data.view as IAVGallery
});
event.preventDefault();
event.stopPropagation();
break;
} else if (type === "set-layout") {
updateLayout({
target,