You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to render a single element (a div in my case). When I do this I end up with a canvas that is the size of the entire body instead of the single element. It would be ideal if the canvas were the size of the element passed in.
The text was updated successfully, but these errors were encountered:
It unfortunately isn't that simple. Just because an element is of a certain size, doesn't mean that the contents of that element reside inside of that space. Very simple examples are shadows or positioned elements, example:
There is currently no option to automatically clip it. You could just fetch the position of the element (x and y) and check its width and height and clip the canvas using that. (I included jQuery methods already in that fiddle)
I am attempting to render a single element (a div in my case). When I do this I end up with a canvas that is the size of the entire body instead of the single element. It would be ideal if the canvas were the size of the element passed in.
The text was updated successfully, but these errors were encountered: