Skip to content

Instantly share code, notes, and snippets.

@pier-oliviert
Created February 21, 2018 18:09
Show Gist options
  • Select an option

  • Save pier-oliviert/05c545dce153ee20f588ca8be683b56c to your computer and use it in GitHub Desktop.

Select an option

Save pier-oliviert/05c545dce153ee20f588ca8be683b56c to your computer and use it in GitHub Desktop.
this.nodes = this.walkers.map(walker => {
walker.advance()
let node = walker.currentNode
const positions = this.walkers.map(walker => walker.positionFor(node))
if (!node || Math.max.apply(this, positions) > this.index) {
node = walker.passthrough()
}
return node
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment