🎨 反链面板块标打开

This commit is contained in:
Vanessa 2024-11-04 17:22:15 +08:00
parent 358fedbbd9
commit 8bd4056a0e
2 changed files with 24 additions and 9 deletions

View file

@ -1,8 +1,10 @@
import {hasClosestBlock} from "../../../protyle/util/hasClosest";
import {getTopAloneElement} from "../../../protyle/wysiwyg/getBlock";
import {enterBack, zoomOut} from "../../../menus/protyle";
/// #if !MOBILE
import {openFileById} from "../../../editor/util";
import {Constants} from "../../../constants";
/// #endif
import {checkFold} from "../../../util/noRelyPCFunction";
export const onlyProtyleCommand = (options: {
command: string,
@ -21,11 +23,16 @@ export const onlyProtyleCommand = (options: {
}
const id = topNodeElement.getAttribute("data-node-id");
if (options.protyle.options.backlinkData) {
openFileById({
app: options.protyle.app,
id,
action: [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS]
/// #if !MOBILE
checkFold(id, (zoomIn, action) => {
openFileById({
app: options.protyle.app,
id,
action,
zoomIn
});
});
/// #endif
} else {
zoomOut({protyle: options.protyle, id});
}