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

add link.view_generator #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoshi6jp
Copy link

@yoshi6jp yoshi6jp commented May 5, 2021

This PR add link pathGenerator, when pathGenerator is used, it supports customizable link.

@antoninklopp
Copy link
Collaborator

Hi @yoshi6jp ,

Thank you very much for opening this PR, it will be an awesome addition to the library.

From an API point of view, what do you think about making it like the node.viewGenerator?

Which would be :

  • renaming pathGenerator to viewGenerator
  • passing all the node props to the generator instead of passing lineProps and other props, once more to make the API look like the nodeGenerator API

@yoshi6jp
Copy link
Author

yoshi6jp commented May 18, 2021

Hi @dgautsch , @antoninklopp
I fixed PR

  • rename pathGenerator to viewGenerator
  • change link.viewGenerator parameters
viewGenerator: (props, options) => (
    <CustomLink
     label={props.label}
     source={props.source}
     target={props.target}
     id={options.id}
     textProps={options.textProps}
     lineProps={options.lineProps}
  />)

@yoshi6jp yoshi6jp changed the title add link.path_generator add link.view_generator May 18, 2021
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.

None yet

2 participants