-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Align interactions when plot created inside scaled and/or translated elements using CSS transform #5193
Conversation
Thanks very much @alexhartstone for submitting this PR. |
@alexhartstone FYI - I also added few more commits to that branch that may be of interest. |
@alexhartstone just to let you know. I am investing more time on the dev-branch today. I will let you when I was able to complete my journey. |
…throwing an error
@alexhartstone please pick my commits from https://github.com/plotly/plotly.js/compare/pull-5193_ms or alternatively allow us as the maintainers access to push into your branch. Please find the instructions here https://github.com/plotly/plotly.js/blob/master/.github/PULL_REQUEST_TEMPLATE.md With all those fixes the transforms e.g. |
@alexhartstone I just noticed that there is a problem with the position of hover on |
@alexhartstone Also the |
@alexcjohnson This PR is now ready for review. |
Issues with So this looks ready to 💃 |
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful - nice work @archmoj and @alexhartstone! Fantastic tests.
💃 pending confirmation that mapbox works right in FF looks like you've confirmed 🎉
@alexhartstone please open a new issue describing why recomputing transform matrix on events is required in your particular application with a demo like this codepen. |
Awesome @archmoj @alexcjohnson thanks guys! |
Thank you so much for taking the initiative on this @alexhartstone ! |
@alexhartstone, Thanks you so much for this fix. I spent days trying to workaround, unscaling and rescaling. |
Fixes #888.
This is the first commit of a few fixes for interactions with plots that are broken due when css transform scaling is applied.
The general aim is to undo the transform matrices applied to these elements for the interactions.
TODOs:
pan
zoom
&pan
internary
&polar
scattermapbox
hover
&select
choroplethmapbox
hover
hover
onsankey
tracehover
onparcats
tracehover
,select
anddrag-zoom
tests forcartesian
subplotshover
,select
anddrag-zoom
tests forpolar
subplotshover
,select
anddrag-zoom
tests formapbox
subplots i.e.choroplethmapbox
andscattermapbox
hover
,select
anddrag-zoom
tests forgeo
subplots e.g.choropleth
hover
,select
anddrag-zoom
tests forternary
subplots