mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
This commit is contained in:
parent
a223c1b2a3
commit
ef9c5450e8
2 changed files with 5 additions and 2 deletions
|
|
@ -170,7 +170,8 @@ export class Protyle {
|
||||||
id: options.blockId,
|
id: options.blockId,
|
||||||
k: options.key || "",
|
k: options.key || "",
|
||||||
isBacklink: mergedOptions.action.includes(Constants.CB_GET_BACKLINK),
|
isBacklink: mergedOptions.action.includes(Constants.CB_GET_BACKLINK),
|
||||||
mode: (mergedOptions.action && mergedOptions.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0, // 0: 仅当前 ID(默认值),1:向上 2:向下,3:上下都加载,4:加载最后
|
// 0: 仅当前 ID(默认值),1:向上 2:向下,3:上下都加载,4:加载最后
|
||||||
|
mode: (mergedOptions.action && mergedOptions.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0,
|
||||||
size: mergedOptions.action?.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
|
size: mergedOptions.action?.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
|
||||||
}, getResponse => {
|
}, getResponse => {
|
||||||
onGet(getResponse, this.protyle, mergedOptions.action, options.scrollAttr);
|
onGet(getResponse, this.protyle, mergedOptions.action, options.scrollAttr);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,9 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
|
||||||
});
|
});
|
||||||
}, Constants.TIMEOUT_BLOCKLOAD);
|
}, Constants.TIMEOUT_BLOCKLOAD);
|
||||||
}
|
}
|
||||||
if (protyle.wysiwyg.element.getAttribute("data-top") || protyle.block.showAll || protyle.scroll.lastScrollTop === element.scrollTop || protyle.scroll.lastScrollTop === -1) {
|
if (protyle.wysiwyg.element.getAttribute("data-top") || protyle.block.showAll ||
|
||||||
|
(protyle.scroll && protyle.scroll.element.classList.contains("fn__none")) || !protyle.scroll ||
|
||||||
|
protyle.scroll.lastScrollTop === element.scrollTop || protyle.scroll.lastScrollTop === -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (protyle.scroll.lastScrollTop - element.scrollTop > 0) {
|
if (protyle.scroll.lastScrollTop - element.scrollTop > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue