mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
9da8f9b194
commit
3010df69b4
7 changed files with 360 additions and 42 deletions
|
|
@ -38,6 +38,7 @@ import {openCalcMenu} from "./calc";
|
|||
import {escapeAttr, escapeHtml} from "../../../util/escape";
|
||||
import {Dialog} from "../../../dialog";
|
||||
import {bindLayoutEvent, getLayoutHTML} from "./layout";
|
||||
import {setGalleryCover, setGallerySize} from "./gallery/util";
|
||||
|
||||
export const openMenuPanel = (options: {
|
||||
protyle: IProtyle,
|
||||
|
|
@ -1360,6 +1361,36 @@ export const openMenuPanel = (options: {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "set-gallery-cover") {
|
||||
setGalleryCover({
|
||||
target,
|
||||
protyle: options.protyle,
|
||||
nodeElement: options.blockElement,
|
||||
view: data.view as IAVGallery
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "set-gallery-size") {
|
||||
setGallerySize({
|
||||
target,
|
||||
protyle: options.protyle,
|
||||
nodeElement: options.blockElement,
|
||||
view: data.view as IAVGallery
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "set-layout") {
|
||||
setPageSize({
|
||||
target,
|
||||
protyle: options.protyle,
|
||||
avID,
|
||||
nodeElement: options.blockElement
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
}
|
||||
// 有错误日志,没找到重现步骤,需先判断一下
|
||||
if (!target || !target.parentElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue