mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
pass linear-gradient2 test for undefined case
This commit is contained in:
parent
0a671a48a2
commit
13f75e8fb0
@ -603,7 +603,7 @@ export class CanvasRenderer extends Renderer {
|
|||||||
]);
|
]);
|
||||||
const pattern = this.ctx.createPattern(
|
const pattern = this.ctx.createPattern(
|
||||||
this.resizeImage(image, width, height),
|
this.resizeImage(image, width, height),
|
||||||
repeatTypes[+container.styles.backgroundRepeat]
|
repeatTypes[+container.styles.backgroundRepeat || 0]
|
||||||
) as CanvasPattern;
|
) as CanvasPattern;
|
||||||
this.renderRepeat(path, pattern, x, y);
|
this.renderRepeat(path, pattern, x, y);
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ export class CanvasRenderer extends Renderer {
|
|||||||
if (width > 0 && height > 0) {
|
if (width > 0 && height > 0) {
|
||||||
const pattern = this.ctx.createPattern(
|
const pattern = this.ctx.createPattern(
|
||||||
canvas,
|
canvas,
|
||||||
repeatTypes[+container.styles.backgroundRepeat]
|
repeatTypes[+container.styles.backgroundRepeat || 0]
|
||||||
) as CanvasPattern;
|
) as CanvasPattern;
|
||||||
this.renderRepeat(path, pattern, x, y);
|
this.renderRepeat(path, pattern, x, y);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user