-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: Svg pointer coordinates action #78
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is simply to propose the addition of a new action for the community, feel free to close or delete this issue if you think this is not a worthy proposal.
I recently had to work with pointer events and
svg
elements and faced the annoying case where the auto-scaling resulting from thesvg
'sviewBox
meant the pointer coordinates retrieved from native events were misaligned with thesvg
's coordinates space. This is just a question of reversing the transformation, and luckily could be done rather easily with methods already available. Here's the action I came up with:If you think this could be an interesting addition, dont hesitate to adapt it so it better fits
svelte-legos
's apis.The text was updated successfully, but these errors were encountered: