Skip to content
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

Iteration methods such as node.eachBefore should pass the index, too. #67

Closed
nathanbowser opened this issue Nov 16, 2016 · 2 comments · Fixed by #155
Closed

Iteration methods such as node.eachBefore should pass the index, too. #67

nathanbowser opened this issue Nov 16, 2016 · 2 comments · Fixed by #155

Comments

@nathanbowser
Copy link

I'm upgrading some code from v3 to v4. I think it'd be useful for eachBefore and perhaps the other loops to receive an index. e.g. Migrating this block: http://bl.ocks.org/mbostock/1093025

@mbostock
Copy link
Member

mbostock commented Nov 1, 2017

I support this change. It would need to be done consistently across all node iteration methods.

@mbostock mbostock changed the title Index passed to eachBefore Iteration methods such as node.eachBefore should pass the index, too. Oct 22, 2019
@mbostock
Copy link
Member

Implemented in 62a6211.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants