mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 08:16:10 +01:00
This commit is contained in:
parent
8c35440a77
commit
74b4a00a2f
42 changed files with 426 additions and 270 deletions
|
|
@ -3,6 +3,7 @@ import {getSelectionOffset} from "../util/selection";
|
|||
import {fetchPost} from "../../util/fetch";
|
||||
import {onGet} from "../util/onGet";
|
||||
import {Constants} from "../../constants";
|
||||
import {App} from "../../index";
|
||||
|
||||
export const saveScroll = (protyle: IProtyle, getObject = false) => {
|
||||
if (!protyle.wysiwyg.element.firstElementChild || window.siyuan.config.readonly) {
|
||||
|
|
@ -45,6 +46,7 @@ export const saveScroll = (protyle: IProtyle, getObject = false) => {
|
|||
};
|
||||
|
||||
export const getDocByScroll = (options: {
|
||||
app: App,
|
||||
protyle: IProtyle,
|
||||
scrollAttr: IScrollAttr,
|
||||
mergedOptions?: IOptions,
|
||||
|
|
@ -68,7 +70,13 @@ export const getDocByScroll = (options: {
|
|||
}, response => {
|
||||
actions.push(Constants.CB_GET_ALL);
|
||||
options.protyle.breadcrumb?.toggleExit(false);
|
||||
onGet(response, options.protyle, actions, options.scrollAttr);
|
||||
onGet({
|
||||
data: response,
|
||||
protyle: options.protyle,
|
||||
action: actions,
|
||||
scrollAttr: options.scrollAttr,
|
||||
app: options.app
|
||||
});
|
||||
if (options.cb) {
|
||||
options.cb();
|
||||
}
|
||||
|
|
@ -81,7 +89,13 @@ export const getDocByScroll = (options: {
|
|||
endID: options.scrollAttr.endId,
|
||||
}, response => {
|
||||
options.protyle.breadcrumb?.toggleExit(true);
|
||||
onGet(response, options.protyle, actions, options.scrollAttr);
|
||||
onGet({
|
||||
data: response,
|
||||
protyle: options.protyle,
|
||||
action: actions,
|
||||
scrollAttr: options.scrollAttr,
|
||||
app: options.app
|
||||
});
|
||||
if (options.cb) {
|
||||
options.cb();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue