|
I recently switched a project over from html2canvas-pro to snapdom because I liked the idea of a faster and smaller package. That said, I've run into some weird behavioral differences. On html2canvas (h2c), when it filters out unused elements, my capture area is properly responsive and shrinks/grows accordingly. Is there some known issue where Snapdom doesn't respect flex box? (I do use An additional problem I had hoped to solved via a plugin is that h2c exposes two configuration options: These can be used to change the size of the rendering element (I use it for displaying mobile device captures in a desktop layout). Hoping someone can point me in the right direction for correcting my issues. Thanks! |
Replies: 1 comment
|
Sorry for the delayed reply, and thanks for the detailed writeup — this was helpful to dig into. On the shrink/flexbox issue: you've actually found a real gap, not a misconfiguration on your part. A couple of quick notes:
So what you're seeing is an actual current limitation in the capture engine, not something you're doing wrong. I'm going to work on improving this — properly honoring On I'll treat this as something to improve on the engine side rather than expecting it to be solved purely from userland — will follow up here once there's progress. Thanks again for the detailed report, it's genuinely useful. |
Sorry for the delayed reply, and thanks for the detailed writeup — this was helpful to dig into.
On the shrink/flexbox issue: you've actually found a real gap, not a misconfiguration on your part. A couple of quick notes:
filter+filterMode: 'remove', that option currently isn't wired into the size-correction pass at all — the bbox stays at the original element's full size no matter what gets filtered out.exclude+excludeMode: 'remove'instead, you should see the box shrink vertically when content is removed — but horizontal shrink is not implemented, and flex/grid/table containers are explicitly skipped from the shrink logic today to avoid producing f…