Change width and height to come from getBoundingClientRect rather than offsetWidth/offsetHeight#97
Conversation
…n offsetWidth/offsetHeight
|
Hey @RoystonS would still value your thoughts here. |
|
Ok, so MDN (https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth) recommends the use of
So this behaviour sounds excellent. I can see that you're planning to deprecate the other parameters at the next major release. Fabulous stuff. Out of an abundance of paranoia around a public API I'll raise that it's possible that the change of behaviour of width/height to start returning non-integers might be an issue for some people. (Indeed an app of mine failed in production last week because a third party REST API started returning doubles instead of integers but in that case I had a .NET app typed as 'int' referencing the service's DTO.) But, because we're entirely within a JS API, using numbers, it shouldn't be an issue? |
|
Appreciate the thoughtful response. I agree that it seems unlikely to be a problem in this context. I think I'll go for it. |
|
Just published 1.0.26 |

Resolves #96
cc @RoystonS for thoughts