tsayen / dom-to-image

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

Capturing element in-position #417

Open rbsam176 opened 2 years ago

rbsam176 commented 2 years ago

Use case

Trying to capture parent div containing image with overlaying text in variable position within viewport.

jsfiddle

Expected behaviour

Produces PNG with speech bubble, overlaying text and transparent background, regardless of the position of the element.

Actual behaviour

Whenever the target element is positioned away from left:0/top:0 it is not able to capture it.

Library version

2.6

Browsers

Chrome