mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
b53cb4974b
commit
ff64e5fcef
3 changed files with 15 additions and 13 deletions
|
|
@ -335,15 +335,11 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackSt
|
|||
fileModel.selectItem(protyle.notebookId, protyle.path);
|
||||
}
|
||||
}
|
||||
const models = getAllModels();
|
||||
updateOutline(models, protyle, reload);
|
||||
updateBacklinkGraph(models, protyle);
|
||||
} else {
|
||||
// 关闭所有页签时,需更新对应的面板
|
||||
const models = getAllModels();
|
||||
updateOutline(models, protyle, reload);
|
||||
updateBacklinkGraph(models, protyle);
|
||||
}
|
||||
// 切换页签或关闭所有页签时,需更新对应的面板
|
||||
const models = getAllModels();
|
||||
updateOutline(models, protyle, reload);
|
||||
updateBacklinkGraph(models, protyle);
|
||||
setTitle(title);
|
||||
};
|
||||
|
||||
|
|
@ -373,7 +369,7 @@ const updateOutline = (models: IModels, protyle: IProtyle, reload = false) => {
|
|||
fetchPost("/api/outline/getDocOutline", {
|
||||
id: blockId,
|
||||
}, response => {
|
||||
if (!isCurrentEditor(blockId)) {
|
||||
if (!isCurrentEditor(blockId) || item.blockId === blockId) {
|
||||
return;
|
||||
}
|
||||
item.update(response, blockId);
|
||||
|
|
@ -447,7 +443,7 @@ export const updateBacklinkGraph = (models: IModels, protyle: IProtyle) => {
|
|||
k: item.inputsElement[0].value,
|
||||
mk: item.inputsElement[1].value,
|
||||
}, response => {
|
||||
if (!isCurrentEditor(blockId)) {
|
||||
if (!isCurrentEditor(blockId) || item.blockId === blockId) {
|
||||
item.element.querySelector('.block__icon[data-type="refresh"] svg').classList.remove("fn__rotate");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue