This commit is contained in:
parent
683ee468ab
commit
feedc48951
6 changed files with 9 additions and 9 deletions
|
@ -44,14 +44,14 @@ export class MobileBacklinks {
|
|||
element: this.element.querySelector(".backlinkList") as HTMLElement,
|
||||
data: null,
|
||||
click(element: HTMLElement) {
|
||||
openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]);
|
||||
openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||
}
|
||||
});
|
||||
this.mTree = new Tree({
|
||||
element: this.element.querySelector(".backlinkMList") as HTMLElement,
|
||||
data: null,
|
||||
click: (element) => {
|
||||
openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]);
|
||||
openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||
},
|
||||
});
|
||||
this.element.addEventListener("click", (event) => {
|
||||
|
|
|
@ -37,7 +37,7 @@ export class MobileOutline {
|
|||
document.getElementById(id)?.scrollIntoView();
|
||||
} else {
|
||||
checkFold(id, (zoomIn) => {
|
||||
openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
|
||||
openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ window.hideKeyboardToolbar = hideKeyboardToolbar;
|
|||
window.openFileByURL = (openURL) => {
|
||||
if (openURL && isSYProtocol(openURL)) {
|
||||
openMobileFileById(siyuanApp, getIdFromSYProtocol(openURL),
|
||||
getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -607,7 +607,7 @@ const initSearchEvent = (app: App, element: Element, config: Config.IUILayoutTab
|
|||
preventScroll(window.siyuan.mobile.editor.protyle);
|
||||
}
|
||||
checkFold(id, (zoomIn) => {
|
||||
openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
});
|
||||
closePanel();
|
||||
} else {
|
||||
|
|
|
@ -174,7 +174,7 @@ export const initFramework = (app: App, isStart: boolean) => {
|
|||
const idZoomIn = getIdZoomInByPath();
|
||||
if (idZoomIn.id) {
|
||||
openMobileFileById(app, idZoomIn.id,
|
||||
idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) {
|
||||
|
|
|
@ -2142,7 +2142,7 @@ export class WYSIWYG {
|
|||
action.push(Constants.CB_GET_HL);
|
||||
}
|
||||
/// #if MOBILE
|
||||
openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
activeBlur();
|
||||
hideKeyboardToolbar();
|
||||
/// #else
|
||||
|
@ -2208,7 +2208,7 @@ export class WYSIWYG {
|
|||
excludeIDs: [blockElement.getAttribute("data-node-id")]
|
||||
}, (response) => {
|
||||
checkFold(response.data[0], (zoomIn) => {
|
||||
openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
activeBlur();
|
||||
hideKeyboardToolbar();
|
||||
});
|
||||
|
@ -2282,7 +2282,7 @@ export class WYSIWYG {
|
|||
const embedId = embedItemElement.getAttribute("data-id");
|
||||
checkFold(embedId, (zoomIn, action) => {
|
||||
/// #if MOBILE
|
||||
openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
activeBlur();
|
||||
hideKeyboardToolbar();
|
||||
/// #else
|
||||
|
|
Loading…
Add table
Reference in a new issue