mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: zero size iframe rendering (#1863)
This commit is contained in:

committed by
Niklas von Hertzen

parent
61f4819e02
commit
81dcf7b6be
@ -306,17 +306,19 @@ export class CanvasRenderer {
|
||||
});
|
||||
|
||||
const canvas = await iframeRenderer.render(container.tree);
|
||||
this.ctx.drawImage(
|
||||
canvas,
|
||||
0,
|
||||
0,
|
||||
container.width,
|
||||
container.width,
|
||||
container.bounds.left,
|
||||
container.bounds.top,
|
||||
container.bounds.width,
|
||||
container.bounds.height
|
||||
);
|
||||
if (container.width && container.height) {
|
||||
this.ctx.drawImage(
|
||||
canvas,
|
||||
0,
|
||||
0,
|
||||
container.width,
|
||||
container.height,
|
||||
container.bounds.left,
|
||||
container.bounds.top,
|
||||
container.bounds.width,
|
||||
container.bounds.height
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (container instanceof InputElementContainer) {
|
||||
|
Reference in New Issue
Block a user