Bug fix: indexFromSetName on invisible sets#771
Merged
Conversation
If the last set(s) have their visibility set to false, their names would not be added to `setIndexByName_`, so `indexFromSetName` would not be able to find them. This fixes that problem.
| // In 1.1.1, if you request the last set and it's invisible, the method returns undefined. | ||
| it('testIndexFromSetNameOnInvisibleSet', function() { | ||
|
|
||
| var localOpts = opts; |
Owner
There was a problem hiding this comment.
This doesn't actually copy anything. If you want to do that there's a method in utils.
Owner
Contributor
Author
|
Yes, I think it addresses both those issues. I'll take a look at the test and update it tomorrow. |
Owner
|
Squashed & merged. Thanks! |
Contributor
Author
This was referenced Aug 26, 2016
Owner
|
Thanks for the reminder! Closed them out. |
PierrickKoch
pushed a commit
to PierrickKoch/dygraphs
that referenced
this pull request
Sep 15, 2016
* indexFromSetName works with trailing invisible sets If the last set(s) have their visibility set to false, their names would not be added to `setIndexByName_`, so `indexFromSetName` would not be able to find them. This fixes that problem. * Corrected test. * Properly clone graph options
PierrickKoch
pushed a commit
to PierrickKoch/dygraphs
that referenced
this pull request
Sep 22, 2016
* indexFromSetName works with trailing invisible sets If the last set(s) have their visibility set to false, their names would not be added to `setIndexByName_`, so `indexFromSetName` would not be able to find them. This fixes that problem. * Corrected test. * Properly clone graph options
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.
Calling
indexFromSetNameon the last set would fail if its visibility was set to false, because the set's label would not be added to the internal list of sets (stored in thesetIndexByName_variable).This pull request fixes the issue, and adds a test to check that it works.
The test added to
tests/data_api.jsprovides an example that currently fails, and now passes with this fix.