ember-table
ember-table copied to clipboard
Refactor offsetHeight use float-compat API
offsetHeight, per MDN, is an API which returns integer values. This makes is inappropriate to use in calculations of current UI scale (usually from a transform) as it rounds any floating point height into an integer.
This PR changes the getScale function to use getComputedStyle to read off the logical height of the element. This API supports greater precision (to at least 3 digits) though it also may not provide the same level of precision as getBoundingClientRect.
This prevents the positioning data for cells (which is impacted by scale) from being corrupted by heights which are at decimal precision.