visx icon indicating copy to clipboard operation
visx copied to clipboard

[@visx/event] Bad svg point calculation in Firefox

Open vovakulikov opened this issue 5 years ago • 2 comments

Hi there.

It seems like in Firefox svg.screenCTM() result is a bit different compared to other browsers (Safari, Chrome). More about this here https://bugzilla.mozilla.org/show_bug.cgi?id=1610093

Since @visx/event uses this API to calculate svg point position https://github.com/airbnb/visx/blob/d5fb82e42af56da4ee325ac5d2028fde52a48b01/packages/visx-event/src/localPointGeneric.ts#L12-L25

This all leads us to the case when we translate our chart we get a bad tooltip and cursor line position.

Screenshot 2021-04-17 at 15 17 32

vovakulikov avatar Apr 17 '21 12:04 vovakulikov

Thanks for the report @vovakulikov 🙏 Not sure what an ideal fix is for that, open to suggestions/thoughts!

williaster avatar Apr 21 '21 00:04 williaster