Replaced direct DOM manipulation of live dashboard elements with a dedicated, off-screen template canvas (.export-canvas).
Cloned active .progress-card elements into an isolated container (.export-cards-holder), ensuring the on-screen UI remains completely untouched and non-flickering during image generation.
Moved aspect ratio, high-resolution dimensions (600x600), padding, and font-scaling rules directly into CSS for clean separation of concerns.
Error Fixes & Cleanup
Fixed ReferenceError caused by leftover references to targetContainer and stampEl inside initExportImageFeature.
Updated html2canvas target from main dashboard container to the temporary canvasEl.
Streamlined fallback DOM cleanup logic inside the try...catch block to guarantee off-screen elements are properly garbage collected.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.