Clean up debugging code and refine error handling

Removed unnecessary `console.log` statements from `pdf-viewer.js`
and `receiver-signature.js` to reduce console output in production.
Simplified error handling in `pdf-viewer.js` for better clarity,
including consolidating error logging and removing redundant
handling for `RenderingCancelledException`.

Deleted the `debugDumpViewerDom` function and its public API
reference from `receiver-signature.js` as part of a cleanup
effort to eliminate unused debugging utilities. Streamlined
code related to event listener management in `pdf-viewer.js`
while retaining core functionality.
This commit is contained in:
2026-06-05 13:49:39 +02:00
parent c26ad9e1c2
commit d9ab6b3eff
2 changed files with 3 additions and 45 deletions

View File

@@ -216,18 +216,6 @@ window.receiverSignature = (() => {
overlayButtons.set(annotationId, { btn: wrapper, signed: isChecked });
}
function debugDumpViewerDom() {
const wrapper = document.querySelector(VIEWER_WRAPPER_SEL);
if (!wrapper) { console.warn('[annot] .receiver-viewer-wrapper not found'); return; }
console.group('[annot] viewer DOM snapshot');
const cs = new Set();
wrapper.querySelectorAll('*').forEach(el => el.classList.forEach(c => cs.add(c)));
console.log('classes:', [...cs].sort().join(', '));
console.log('scroll container:', document.querySelector(SCROLL_CONTAINER_SEL));
console.log('page images:', document.querySelectorAll(PAGE_IMG_SEL));
console.groupEnd();
}
// ?? Signature Pad ???????????????????????????????????????????????????????
function _pos(canvas, event) {
@@ -332,7 +320,6 @@ window.receiverSignature = (() => {
return {
startTyped: startTyped,
installAnnotationCheckboxes: installAnnotationCheckboxes,
debugDumpViewerDom: debugDumpViewerDom,
initialize: initialize,
initializeTyped: initializeTyped,
initializeImage: initializeImage,