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")) {
return;
}
const tab = documentTab(), state = tab.state;
const previous = state.renderAnnotations;
state.renderAnnotations = !state.renderAnnotations;
updateAnnotationButton();
if (!state.doc) {
return;
}
await openDocument({
pageIndex: state.pageIndex,
fitMode: state.fitMode,
skipAutoFonts: true,
reuseSession: true,
});
try {
await refreshPageDisplay();
} catch (err) {
state.renderAnnotations = previous;
if (isForegroundDocument(tab)) {
updateAnnotationButton();
showError(err, false);
}
}
}
function displayMode() {