mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-07 08:01:47 +01:00
This commit is contained in:
parent
bada8daa01
commit
73638be0c3
2 changed files with 6 additions and 2 deletions
|
|
@ -104,7 +104,9 @@ export class MobileOutline extends Model {
|
|||
}
|
||||
} else {
|
||||
checkFold(id, (zoomIn) => {
|
||||
openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] : [Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
|
||||
openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] :
|
||||
[Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML],
|
||||
"start");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
|
|||
if (blockElement) {
|
||||
pushBack();
|
||||
if (action.includes(Constants.CB_GET_HL)) {
|
||||
highlightById(window.siyuan.mobile.editor.protyle, id);
|
||||
highlightById(window.siyuan.mobile.editor.protyle, id, scrollPosition);
|
||||
} else {
|
||||
scrollCenter(window.siyuan.mobile.editor.protyle, blockElement, scrollPosition);
|
||||
}
|
||||
|
|
@ -61,6 +61,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
|
|||
const protyleOptions: IProtyleOptions = {
|
||||
blockId: id,
|
||||
rootId: data.data.rootID,
|
||||
scrollPosition,
|
||||
action,
|
||||
render: {
|
||||
scroll: true,
|
||||
|
|
@ -105,6 +106,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
|
|||
data: getResponse,
|
||||
protyle: window.siyuan.mobile.editor.protyle,
|
||||
action,
|
||||
scrollPosition,
|
||||
afterCB() {
|
||||
app.plugins.forEach(item => {
|
||||
item.eventBus.emit("switch-protyle", {protyle: window.siyuan.mobile.editor.protyle});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue