mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
49e5445ccd
commit
85baeda7f9
1 file changed
+11
-6
+11
-6
@@ -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() {
|
||||||
|
|||||||
Reference in new issue
Block a user