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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user