Objects larger than screen are only rendered to the max screen size
See original GitHub issueHi,
I discovered that objects (e.g. a DIV) larger than the screen (e.g. Shown with scroll-bars) would only render to the max dimensions of the screen.
Changing this line:-
return renderDocument(node.ownerDocument, options, node.ownerDocument.defaultView.innerWidth, node.ownerDocument.defaultView.innerHeight).then(function(canvas)
to this:-
return renderDocument(node.ownerDocument, options, $(node).width(), $(node).height()).then(function(canvas)
resolves the issue.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Need to make SDL/OpenGL window size larger than ...
Use a framebuffer object with an appropriately sized renderbuffer target. If the maximum supported renderbuffer size doesn't suffice your ...
Read more >Windows scaling issues for high-DPI devices
Select Display > Change the size of text, apps, and other items, and then adjust the slider for each monitor.
Read more >The picture looks too big, stretched, does not fit the screen ...
IMPORTANT: In this topic, TV settings to display the appropriate size of image on the TV and its effects are introduced.
Read more >Sizing items in CSS - Learn web development | MDN
Images should be appropriately sized to be no larger than they need to be for the largest size they are displayed in the...
Read more >Responsive Design Tutorial: Media Query Examples & More
<link rel="stylesheet" media="screen and (max-device-width: 480px)" ... For example, this portion of our responsive CSS would only be used if the current ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. I applied Lennyman’s workaround without touching the html2canvas code: Suppose your target is $(element)
@cenap : Ur logic… rocked!!! thank a lot