Better support for multiple canvases to be created
See original GitHub issuehtml2canvas can be a slow if you need to make a canvases for multiple items, because the whole document needs cloned multiple times, it would be nice to have a way to send multiple items to be converted to canvas.
Few different ways would suffice
- Pass a collection of node to create canvases for, then the promise would return an array
var nodes = [];
// fill nodes
html2canvas(nodes).then(function(canvases){
// use canvases
});
- Piggy back the removeContainer option and allow you to reference an iframe to operate on in the options. This gives a greater amount of flexibility to the end user
var nodes = [];
// fill nodes
var iframe;
html2canvas(node[0], {removeContainer: false}).then(function(canvas, iframe){
// use canvas
iframe = $(iframe).attr('id');
});
html2canvas(node[1], {removeContainer: true, iframe: iframe})then(function(canvas){
// use canvas
});
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Should I have multiple canvases in the same scene?
In my experience, multiple canvases are not required for most situations. Better to have a single canvas and simply use multiple panels ...
Read more >Is it better to stack multiple canvases in DOM or control all ...
Right, but the answer really is that it depends. Each specific use case is different. Certainly using more canvases equates to more rendering ......
Read more >Solved: Add Multiple Canvases to an Entity Form
Solved: I need to include two canvases within the same entity form. Has anyone figured this out yet? Doing one canvas app that...
Read more >Three.js Multiple Canvases Multiple Scenes
One more solution would be to render to an off screen canvas and copy the result to a 2D canvas at each element....
Read more >VPython for Beginners 31 - Multiple Canvases - YouTube
You can run multiple animations at once in separate frames using the canvas function. Support this channel: http://ko-fi.com/LetsCodePhysics, ...
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
💡 Without touching the library, a workaround could be to make a Texture Atlas, call
html2canvas
over a div, get the resulting canvas and crop it accordingly to produce multiple canvases.$50 might not be enough 😆