fix(注解切换): 修复注解切换布局
build.yaml / build (push) Successful in 48s

This commit is contained in:
xiaoqidun committed 2026-10-22 23:55:32 +08:00
1 parent 49e5445ccd
commit 85baeda7f9
1 file changed
+11 -6
+11 -6
View File
@@ -5903,17 +5903,22 @@ async function toggleAnnotations() {
if (document.body.hasAttribute("data-busy")) { if (document.body.hasAttribute("data-busy")) {
return; return;
} }
const tab = documentTab(), state = tab.state;
const previous = state.renderAnnotations;
state.renderAnnotations = !state.renderAnnotations; state.renderAnnotations = !state.renderAnnotations;
updateAnnotationButton(); updateAnnotationButton();
if (!state.doc) { if (!state.doc) {
return; return;
} }
await openDocument({ try {
pageIndex: state.pageIndex, await refreshPageDisplay();
fitMode: state.fitMode, } catch (err) {
skipAutoFonts: true, state.renderAnnotations = previous;
reuseSession: true, if (isForegroundDocument(tab)) {
}); updateAnnotationButton();
showError(err, false);
}
}
} }
function displayMode() { function displayMode() {