Repository navigation
Add fallbacks for manual manipulation of slider/frames - #1233
Merged
Merged
Conversation
etpinard
reviewed
Dec 7, 2016
| // the join data that creates this slider. So if this slider still exists, | ||
| // the group should be valid, *to the best of my knowledge.* If not, | ||
| // we'd have to look it up by d3 data join index/key. | ||
| var opts = gSlider.data()[0]; |
Contributor
There was a problem hiding this comment.
Does the same behavior happen for updatemenus ?
Contributor
Author
There was a problem hiding this comment.
I think so. Need to investigate make a parallel PR for that. This is one is just of particular concern because of @bpostlethwaite's current project with the slider transform thing.
Contributor
There was a problem hiding this comment.
Ok. No need to address updatemenus in this PR.
Can you open an issue for that and for your This PR does not fix: point above?
etpinard
reviewed
Dec 7, 2016
| // steps have changed since this was initialized. The sliderGroup, | ||
| // however, has not changed since that *is* the slider, so it must | ||
| // be present to receive mouse events. | ||
| function getSliderOpts() { |
etpinard
reviewed
Dec 7, 2016
| /* | ||
| * Recompute the lookup table that maps frame name -> frame object. addFrames/ | ||
| * deleteFrames already manages this data one at a time, so the only time this | ||
| * is necessary is if you poke around manually in `gd._transitionData_frames` |
Contributor
There was a problem hiding this comment.
typo ⏰ gd._transitionData_frames -> gd._transitionData._frames
etpinard
reviewed
Dec 7, 2016
| }); | ||
| }); | ||
|
|
||
| describe('ugly internal manipulation of steps', function() { |
etpinard
reviewed
Dec 7, 2016
| // The selected option no longer exists, so confirm it's | ||
| // been fixed during the process of updating/drawing it: | ||
| expect(gd._fullLayout.sliders[0].active).toEqual(0); | ||
| }).catch(fail).then(done); |
Contributor
|
@bpostlethwaite wanna try this branch out in the workspace? |
This was referenced Dec 7, 2016
Member
|
Yep will do |
Member
|
Successfully used this in WS2 👍 from me |
Contributor
|
@bpostlethwaite I'll release |
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.
cc @bpostlethwaite @etpinard
This PR fixes two cases:
This PR does not fix:
This PR also sneaks in
Plot.recomputeFrameHash(gd)which does what it says. I should add tests for that; it's just a small bonus to prevent @bpostlethwaite from needing to do it manually.