tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.21k stars 1.68k forks source link

domtoimage input output order are not same #406

Open darrylsepeda opened 2 years ago

darrylsepeda commented 2 years ago

Use case: description, code

I use domtoimage to convert my components into images from getElementsByClassname and then put them into pdf with another library, The flow works fine, but the order of input-output no matter if I reverse the order of the input, the output will always be the same. For example, I have rainbow-1, rainbow-2, rainbow-3, whether the order is still the same or I reverse it to become rainbow-3, rainbow-2, rainbow-1, the output will always be rainbow-3, rainbow-2, rainbow-1 in my pdf.

I've searched the issues in Github and couldn't find any related issue with the order.

Expected behavior

The order of input items should be reflected on the output.

Actual behavior (stack traces, console logs etc)

Library version

v2.6.0

Browsers