mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
canvas - removed block of code that caused issues on safari
This commit is contained in:

committed by
Hamaad Chughtai

parent
6020386bbe
commit
162dcc3bef
@ -569,10 +569,6 @@ export class CanvasRenderer extends Renderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resizeImage(image: HTMLImageElement, width: number, height: number): HTMLCanvasElement | HTMLImageElement {
|
resizeImage(image: HTMLImageElement, width: number, height: number): HTMLCanvasElement | HTMLImageElement {
|
||||||
if (image.width === width && image.height === height) {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ownerDocument = this.canvas.ownerDocument ?? document;
|
const ownerDocument = this.canvas.ownerDocument ?? document;
|
||||||
const canvas = ownerDocument.createElement('canvas');
|
const canvas = ownerDocument.createElement('canvas');
|
||||||
canvas.width = Math.max(1, width);
|
canvas.width = Math.max(1, width);
|
||||||
|
Reference in New Issue
Block a user