qq15725 / modern-screenshot

📸 Quickly generate image from DOM node using HTML5 canvas and SVG
https://www.toolpkg.com/image/html-to-image
MIT License
457 stars 32 forks source link

Question: is it possible for me to x, y locations of the cloned nodes and its children? #89

Closed man-shar closed 2 months ago

man-shar commented 2 months ago

I'm trying to get the locations of all text elements inside the cloned node. But all getBoundingClientRects return all zeros (expectedly, perhaps).

Is it possible for me to get the x and y locations of the text elements somehow?

Would appreciate all help.

Thank you! This library is awesome!

man-shar commented 2 months ago

Sorry, this was a brain fart. I just got the rects from the actual nodes 🤦 Closing!