mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
c92b929dda
commit
34c3764dd9
2 changed files with 10 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ export class Bookmark extends Model {
|
|||
openFileById({
|
||||
id,
|
||||
action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],
|
||||
zoomIn: foldResponse.data
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1122,6 +1122,7 @@ const getArticle = (options: {
|
|||
k: options.k,
|
||||
mode: foldResponse.data ? 0 : 3,
|
||||
size: foldResponse.data ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
|
||||
zoom: foldResponse.data,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, options.edit.protyle, foldResponse.data ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_HTML]);
|
||||
const matchElement = options.edit.protyle.wysiwyg.element.querySelector(`div[data-node-id="${options.id}"] span[data-type="search-mark"]`);
|
||||
|
|
@ -1129,6 +1130,14 @@ const getArticle = (options: {
|
|||
const contentRect = options.edit.protyle.contentElement.getBoundingClientRect();
|
||||
options.edit.protyle.contentElement.scrollTop = options.edit.protyle.contentElement.scrollTop + matchElement.getBoundingClientRect().top - contentRect.top - contentRect.height / 2;
|
||||
}
|
||||
const exitFocusElement = options.edit.protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');
|
||||
if (!foldResponse.data) {
|
||||
exitFocusElement.classList.add("fn__none");
|
||||
exitFocusElement.nextElementSibling.classList.add("fn__none");
|
||||
} else {
|
||||
exitFocusElement.classList.remove("fn__none");
|
||||
exitFocusElement.nextElementSibling.classList.remove("fn__none");
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue