tsayen / dom-to-image

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

Div scroll issue #183

Open piyushSinghalDemo opened 6 years ago

piyushSinghalDemo commented 6 years ago

Use case:

If we have much data in a div and i am trying to get small complete image of that content, that time it is giving me scroll in image and only visible part of that div is reflecting in image

[jsfiddle]([https://jsfiddle.net/singhalpiyush1993/2m8dcr63/26/]) https://jsfiddle.net/singhalpiyush1993/2m8dcr63/26/

Expected behavior

i should get complete content in image

Actual behavior (stack traces, console logs etc)

getting only visible part of that saction

Mahmuduman commented 6 years ago

+1 i Have this problem, and waiting a correct ansver for this.

piyushSinghalDemo commented 6 years ago

Hi Guys, Is there any idea i can try to resolve this issue?

Mahmuduman commented 6 years ago

You fix This Problem with div inside div method,

Up level div overflow scroll and have width and heighth, inside div width and height auto

when you try render, select inside div, then it get real width and heigth of element without scroll capture..

sample.