mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
a79125c236
commit
38861683a5
7 changed files with 151 additions and 41 deletions
|
|
@ -20,7 +20,14 @@ import {openAsset} from "../../../editor/util";
|
|||
/// #endif
|
||||
import {previewAttrViewImages} from "../../preview/image";
|
||||
import {assetMenu} from "../../../menus/protyle";
|
||||
import {addView, bindSwitcherEvent, bindViewEvent, getSwitcherHTML, getViewHTML, openViewMenu} from "./view";
|
||||
import {
|
||||
addView,
|
||||
bindSwitcherEvent,
|
||||
bindViewEvent,
|
||||
getSwitcherHTML,
|
||||
getViewHTML,
|
||||
openViewMenu
|
||||
} from "./view";
|
||||
import {focusBlock} from "../../util/selection";
|
||||
import {avRender} from "./render";
|
||||
import {setPageSize} from "./row";
|
||||
|
|
@ -30,6 +37,7 @@ import {updateCellsValue} from "./cell";
|
|||
import {openCalcMenu} from "./calc";
|
||||
import {escapeAttr, escapeHtml} from "../../../util/escape";
|
||||
import {Dialog} from "../../../dialog";
|
||||
import {bindLayoutEvent, getLayoutHTML} from "./layout";
|
||||
|
||||
export const openMenuPanel = (options: {
|
||||
protyle: IProtyle,
|
||||
|
|
@ -537,6 +545,14 @@ export const openMenuPanel = (options: {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "go-layout") {
|
||||
menuElement.innerHTML = getLayoutHTML(data);
|
||||
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);
|
||||
bindLayoutEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement});
|
||||
window.siyuan.menus.menu.remove();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "goSorts") {
|
||||
menuElement.innerHTML = getSortsHTML(data.view.columns, data.view.sorts);
|
||||
bindSortsEvent(options.protyle, menuElement, data, blockID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue