When using "contain" or "cover" the resizer is not able to maintain the hot spots over the target areas.
The image will not change aspect ratio for contain or cover, and If you re-size the viewport to mismatch the image ratio (leaving empty space at top or sides) then the resizer no longer works correctly.
https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
Really nice utility by the way, thank you for providing it to the community.
Thanks!
Edit: I just noticed there was a previous GitHub Issue #85 submitted which is very similar to the one here, just less specific (object-fit defaults to "fill" which does work correctly). Didn't mean to cause any duplication.
When using "contain" or "cover" the resizer is not able to maintain the hot spots over the target areas.
The image will not change aspect ratio for contain or cover, and If you re-size the viewport to mismatch the image ratio (leaving empty space at top or sides) then the resizer no longer works correctly.
https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
Really nice utility by the way, thank you for providing it to the community.
Thanks!
Edit: I just noticed there was a previous GitHub Issue #85 submitted which is very similar to the one here, just less specific (object-fit defaults to "fill" which does work correctly). Didn't mean to cause any duplication.