bug fix: Link label not properly centering#486
bug fix: Link label not properly centering#486cjs8487 wants to merge 1 commit intodanielcaldas:masterfrom
Conversation
danielcaldas
left a comment
There was a problem hiding this comment.
Thanks for the PR! To move forward we require another small iteration on this change.
| fill: this.props.fontColor, | ||
| fontSize: this.props.fontSize, | ||
| fontWeight: this.props.fontWeight, | ||
| textAnchor: "middle", |
There was a problem hiding this comment.
For retro-compatibility to move forward with this PR I'll prefer that we allow clients to pass this prop alongside node.color and others. Please refer to the docs and a sample past PR to know what files require an update to make this work
There was a problem hiding this comment.
Just to clarify, shouldn't the prop be passed alongside other link props, such as link.fontColor? Similarly, should clients be able to pass the startOffset (which is also currently locked to 50%)? That change seems to be of a similar nature to allowing clients to pass textAnchor as a prop, since it was previously locked to "middle". Glad to combine any or all of these changes as you see fit.
There was a problem hiding this comment.
Sorry for the confusion. Yes it should be link.textAnchor, but the changeset should be similar. Here's a PR that introduced a property in the link for reference
Resolves #420
Happened to run into the issue myself while working on a program that relies heavily on link labelling and stumbled across the open issue and figured I'd handle it since I needed the fix. Version still needs to be bumped, I imagine to 2.6.1 but let me know if 2.7 would be preferable for any reason and I'll take care of it