Still animate layout objects if there's no transitioned axis - #1315
Merged
Conversation
rreusser
force-pushed
the
fix-annotation-animation
branch
from
July 17, 2017 18:02
1744d2e to
f587772
Compare
Contributor
Author
|
@etpinard @alexcjohnson Layout animation doesn't currently update container objects unless there's also an axis update. This branch checks for and triggers container object updates in case there is no axis update. I've rebased and added a test for this fix. |
Contributor
Author
|
Nothing urgent, but @etpinard @alexcjohnson does this seem alright? Trying to close out old things. |
etpinard
reviewed
Jul 17, 2017
|
|
||
| redrawObjs(fullLayout.annotations || [], Registry.getComponentMethod('annotations', 'drawOne')); | ||
| redrawObjs(fullLayout.shapes || [], Registry.getComponentMethod('shapes', 'drawOne')); | ||
| redrawObjs(fullLayout.images || [], Registry.getComponentMethod('images', 'draw')); |
Contributor
There was a problem hiding this comment.
Looking at dragbox.js, images can short circuit that loop over objArray above.
Contributor
Author
There was a problem hiding this comment.
Copied the short-circuit code. Maybe there's a more general concept of updating these things.
etpinard
reviewed
Jul 17, 2017
|
|
||
| Plotly.plot(gd, | ||
| [{y: [1, 2, 3]}], | ||
| {annotations: [{text: 'hello'}]} |
Contributor
There was a problem hiding this comment.
It would be nice to 🔒 down the behavior for shapes and images too.
Contributor
|
Beautifully done. 💃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR solves an oversight on my part. At the moment if there's no transitioned axis, then layout objects aren't updated. This PR solves that by calling the layout update if the axes are not otherwise affected.
cc @jackparmer