Vanessa 2024-05-29 11:17:20 +08:00
parent 72e79b05fb
commit d7407b74a5
4 changed files with 34 additions and 18 deletions

View file

@ -365,8 +365,10 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
icon: "iconOpen",
accelerator: window.siyuan.config.keymap.editor.general.openBy.custom + "/" + window.siyuan.languages.click,
click() {
checkFold(refBlockId, (zoomIn, action) => {
action.push(Constants.CB_GET_HL);
checkFold(refBlockId, (zoomIn, action, isRoot) => {
if (!isRoot) {
action.push(Constants.CB_GET_HL);
}
openFileById({
app: protyle.app,
id: refBlockId,
@ -397,8 +399,10 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
icon: "iconLayoutRight",
accelerator: window.siyuan.config.keymap.editor.general.insertRight.custom + "/⌥" + window.siyuan.languages.click,
click() {
checkFold(refBlockId, (zoomIn, action) => {
action.push(Constants.CB_GET_HL);
checkFold(refBlockId, (zoomIn, action, isRoot) => {
if (!isRoot) {
action.push(Constants.CB_GET_HL);
}
openFileById({
app: protyle.app,
id: refBlockId,
@ -414,8 +418,10 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
icon: "iconLayoutBottom",
accelerator: window.siyuan.config.keymap.editor.general.insertBottom.custom + (window.siyuan.config.keymap.editor.general.insertBottom.custom ? "/" : "") + "⇧" + window.siyuan.languages.click,
click() {
checkFold(refBlockId, (zoomIn, action) => {
action.push(Constants.CB_GET_HL);
checkFold(refBlockId, (zoomIn, action, isRoot) => {
if (!isRoot) {
action.push(Constants.CB_GET_HL);
}
openFileById({
app: protyle.app,
id: refBlockId,