Skip to content

Bring back geo trace toggle [fixes #244] #245

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 4 commits into from
Feb 9, 2016
Merged

Bring back geo trace toggle [fixes #244] #245

merged 4 commits into from
Feb 9, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Feb 9, 2016

@mdtusz

Visibility toggling for geo traces has been broken since e8ebcb2

This PR fixes it and adds tests.

- geo plot routine use a classic d3 join/enter/exit pattern
- trace visibility is updated using exit selections
- to simplify the logic, send only visible trace to the geo plot
  routine so that visible traces and svg trace groups match
  one to one.
var traceKey = traceKeys[j];
Plots.getModule(traceKey).plot(this, traceData[traceKey], geoLayout);
var moduleData = traceData[traceKeys[j]];
var _module = moduleData[0]._module;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mdtusz sorry for sneaking this in here.

I believe grabbing _module from the trace objects is more robust then relying on Plots. That way, a plot's required trace modules are scoped inside each plot state, instead of being library-wide globals.

@mdtusz
Copy link
Contributor

mdtusz commented Feb 9, 2016

Definitely a better way to go about it.

💃

@mdtusz mdtusz closed this Feb 9, 2016
@mdtusz mdtusz reopened this Feb 9, 2016
etpinard added a commit that referenced this pull request Feb 9, 2016
Bring back geo trace toggle [fixes #244]
@etpinard etpinard merged commit 8e4cdc7 into master Feb 9, 2016
@etpinard etpinard deleted the fix-geo-toggle branch February 9, 2016 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants