8000 Layout animations for container array'd objects by rreusser · Pull Request #1081 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Layout animations for container array'd objects #1081

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

Merged
merged 10 commits into from
Oct 25, 2016
Next Next commit
Change layout update to use new logic
  • Loading branch information
rreusser committed Oct 25, 2016
commit 891af3b20238775a6b887ace7b6e1c1d06b075f5
4 changes: 3 additions & 1 deletion src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,8 @@ plots.extendObjectWithContainers = function(dest, src, containerPaths) {
for(j = 0; j < srcContainer.length; j++) {
destContainer[j] = plots.extendObjectWithContainers(destContainer[j], srcContainer[j]);
}

destProp.set(destContainer);
}
}

Expand Down Expand Up @@ -1510,7 +1512,7 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
delete layoutUpdate[attr].range;
}

Lib.extendDeepNoArrays(gd.layout, layoutUpdate);
plots.extendLayout(gd.layout, layoutUpdate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, this now guarantees that shapes, images and all the other layout array container can also be animated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there are bugs, yes. It iterates through each of those container arrays as a way of bypassing the No in extendDeepNoArrays. The option to force redraw makes non-animatable things Just Work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Let's 🔒 this down by expanding test case

https://github.com/plotly/plotly.js/pull/1081/files#diff-2032f9a39fb6bbc9611ed5ec74c10c19R68

to transition all layout array containers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lunch, then adding it.


// Supply defaults after applying the incoming properties. Note that any attempt
// to simplify this step and reduce the amount of work resulted in the reconstruction
Expand Down
0