|
|
@@ -336,11 +336,9 @@ this.docHelper = this.docHelper || (() => {
|
|
|
} else {
|
|
|
borderLeft = borderRight = borderTop = borderBottom = 0;
|
|
|
}
|
|
|
- pxWidth = imageElement.clientWidth - paddingLeft - paddingRight - borderLeft - borderRight;
|
|
|
- pxHeight = imageElement.clientHeight - paddingTop - paddingBottom - borderTop - borderBottom;
|
|
|
- if (pxWidth >= 0 && pxHeight >= 0 && paddingLeft >= 0 && paddingRight >= 0 && paddingTop >= 0 && paddingBottom >= 0 && borderLeft >= 0 && borderRight >= 0 && borderTop >= 0 && borderBottom >= 0) {
|
|
|
- return { pxWidth, pxHeight };
|
|
|
- }
|
|
|
+ pxWidth = Math.max(0, imageElement.clientWidth - paddingLeft - paddingRight - borderLeft - borderRight);
|
|
|
+ pxHeight = Math.max(0, imageElement.clientHeight - paddingTop - paddingBottom - borderTop - borderBottom);
|
|
|
+ return { pxWidth, pxHeight };
|
|
|
}
|
|
|
}
|
|
|
|