Skip to content

Conversation

JesusTheHun
Copy link
Contributor

@JesusTheHun JesusTheHun commented Oct 23, 2024

To save the user from fetching properties manually, this PR add the properties in the object received by the function.

// Before
shouldFollow: ({ source, target }) => {
  return graph.getEdgeProperties(source, target).type === 'foo'
});

// After
shouldFollow: ({ props }) => props.type === 'foo',

Copy link
Member

@curran curran left a comment

Choose a reason for hiding this comment

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

LGTM

source: node,
target: n,
graph,
props: graph.getEdgeProperties(node, n)!,
Copy link
Member

Choose a reason for hiding this comment

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

Oh nice! I love how you've maintained backwards compatibility. Excellent!

@curran curran merged commit ae0bea7 into datavis-tech:master Oct 23, 2024
@curran
Copy link
Member

curran commented Oct 23, 2024

Released in https://github.com/datavis-tech/graph-data-structure/releases/tag/v4.1.0

Thank you for this contribution!

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