-
-
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
clear calcdata before redoing it in animations #1737
Conversation
@@ -1813,6 +1813,10 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts) | |||
// of essentially the whole supplyDefaults step, so that it seems sensible to just use | |||
// supplyDefaults even though it's heavier than would otherwise be desired for | |||
// transitions: | |||
|
|||
// first delete calcdata so supplyDefaults knows a calc step is coming | |||
delete gd.calcdata; |
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.
Looks like a solid fix. It will slow down Plotly.animate
though.
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.
There's some logic in Plots.doCalcdata
involving old versus new calcdata that might be obsolete now.
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.
will it? We're calling doCalcdata
no matter what so I'd think this will actually speed it up a tiny bit!
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.
Good point 👍
Here's at least a codepen that isolates this effect (plotly-latest works though so it's not visible in the codepen) https://codepen.io/rsreusser/pen/rmbrXg?editors=0010 Correction: not the wrong frame; just the failure to transition. |
Great thanks! |
Fixes the issue we're seeing with calcTransforms + animations, which was introduced in #1717
Then the question is: what do we test this with and how?
cc @etpinard @rreusser