|
|
@@ -194,14 +194,10 @@ this.docHelper = this.docHelper || (() => {
|
|
|
function getSize(imageElement) {
|
|
|
const computedStyle = getComputedStyle(imageElement);
|
|
|
let width, height, paddingLeft, paddingRight, paddingTop, paddingBottom;
|
|
|
- if (computedStyle.getPropertyValue("box-sizing") == "content-box") {
|
|
|
- paddingLeft = paddingRight = paddingTop = paddingBottom = 0;
|
|
|
- } else {
|
|
|
- paddingLeft = getWidth("padding-left", computedStyle);
|
|
|
- paddingRight = getWidth("padding-right", computedStyle);
|
|
|
- paddingTop = getWidth("padding-top", computedStyle);
|
|
|
- paddingBottom = getWidth("padding-bottom", computedStyle);
|
|
|
- }
|
|
|
+ paddingLeft = getWidth("padding-left", computedStyle);
|
|
|
+ paddingRight = getWidth("padding-right", computedStyle);
|
|
|
+ paddingTop = getWidth("padding-top", computedStyle);
|
|
|
+ paddingBottom = getWidth("padding-bottom", computedStyle);
|
|
|
width = imageElement.clientWidth;
|
|
|
height = imageElement.clientHeight;
|
|
|
if (width >= 0 && height >= 0 && paddingLeft >= 0 && paddingRight >= 0 && paddingTop >= 0 && paddingBottom >= 0) {
|