Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(common): fix incorrectly reported distortion for padded images (#…
…49889) The original code uses clientWidth and clientHeight which returns the width and height of the element including the padding. This results in the aspect ratio being determined incorrectly and the image distortion warning triggering. The new code uses getComputedStyle which returns the width and height without padding. Another advantage of using getComputedStyle is that, unlike clientWidth and clientHeight, the number returned is a decimal which provides greater accuracy. This could allow for lowering the ASPECT_RATIO_TOLERANCE. PR Close #49889
- Loading branch information