|
@@ -171,8 +171,10 @@ this.docHelper = this.docHelper || (() => {
|
|
|
doc.body.appendChild(imgElement);
|
|
doc.body.appendChild(imgElement);
|
|
|
naturalWidth = imgElement.width;
|
|
naturalWidth = imgElement.width;
|
|
|
naturalHeight = imgElement.height;
|
|
naturalHeight = imgElement.height;
|
|
|
- preserveAspectRatio = true;
|
|
|
|
|
imgElement.remove();
|
|
imgElement.remove();
|
|
|
|
|
+ if (naturalWidth > 1 && naturalHeight > 1) {
|
|
|
|
|
+ preserveAspectRatio = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
imageData = {
|
|
imageData = {
|
|
|
width: imageElement.width,
|
|
width: imageElement.width,
|