My challenge involves a small circle with a 4px diameter that I need to scale using anime.js. While it works perfectly at 100% zoom (default), I also require it to behave consistently across different zoom levels, specifically from 50-100%.
To see the issue in action, you can check out this example fiddle: https://jsfiddle.net/6x4ry3no/1/
In the provided fiddle, if you use 'CMD' + '-' or its Windows equivalent to zoom out, you'll notice that the circle loses its perfect shape and becomes a rounded quadrilateral at zoom levels between 50-100%, which is not desirable.
This problem seems to be somewhat connected to how the zoom percentage relates to the width and height of the circle, as it behaves better at certain percentages.
While using an SVG could potentially solve this issue, scaling SVGs would still require a transform to maintain the shape's position, something I'd prefer to avoid.
Any suggestions on how to tackle this? Your insights are greatly appreciated!