浏览代码

:bug: PDF 页签拖拽

Vanessa 1 年之前
父节点
当前提交
5d2be98eab
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      app/src/editor/util.ts

+ 7 - 7
app/src/editor/util.ts

@@ -534,14 +534,14 @@ export const updatePanelByEditor = (options: {
                 }
             }
         }
+        // 切换页签或关闭所有页签时,需更新对应的面板
+        const models = getAllModels();
+        updateOutline(models, options.protyle, options.reload);
+        updateBacklinkGraph(models, options.protyle);
+        options.protyle.app.plugins.forEach(item => {
+            item.eventBus.emit("switch-protyle", {protyle:options.protyle});
+        });
     }
-    // 切换页签或关闭所有页签时,需更新对应的面板
-    const models = getAllModels();
-    updateOutline(models, options.protyle, options.reload);
-    updateBacklinkGraph(models, options.protyle);
-    options.protyle.app.plugins.forEach(item => {
-        item.eventBus.emit("switch-protyle", {protyle:options.protyle});
-    });
 };
 
 export const isCurrentEditor = (blockId: string) => {