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

maxTitleChars property is not being used #114

Closed
usernamedt opened this issue Mar 22, 2019 · 3 comments
Closed

maxTitleChars property is not being used #114

usernamedt opened this issue Mar 22, 2019 · 3 comments

Comments

@usernamedt
Copy link

For some reason the maxTitleChars logic seems to be missing from the current version of graph-view.js but it is stated as the property on the readme page.
It looks like that there was some functionality in the previous versions but now it's gone
https://github.com/uber/react-digraph/blob/489226a1018a992e67ad7b90dcd97c8eb9f70049/src/components/graph-view.js

@ajbogh
Copy link
Contributor

ajbogh commented May 21, 2019

You're right, it looks as though this functionality was accidentally removed. Please feel free to create a PR to add it back. You can find the relevant code in node-text, and you will have to make sure to pass that property down from graph-view to node-text through the node component.

https://github.com/uber/react-digraph/blob/master/src/components/node-text.js

Alternatively, there's a callback function called renderNodeText in graph-view's props where you can return a JSX element with the proper text size. This function, if provided, will render the text rather than returning a NodeText component.

@afro-cloud
Copy link
Contributor

@usernamedt if you don't want to take this on, I'm happy to add it back :)

@usernamedt
Copy link
Author

usernamedt commented Jun 4, 2019

@thesuperhomie It would be great, I’ve got to pass exams atm, can’t help right now

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

No branches or pull requests

3 participants