Closed eukuz closed 2 years ago
Hi @eukuz, thank you for the comment.
Could you explain that the dominant-baseline
property didn't work?
BTW, the https://github.com/anseki/leader-line/issues/334 didn't use JS animation.
The pathLabel
property of the leader line generates a <textPath>
tag. I tried to apply the CSS property dominant-baseline
to the tag for placing the text just in the center or a line path
Speaking of #344 and JS animation I meant this your comment and jsfiddle example
So I need the pathLabel to be like strikethrough with the leader line path
Could you explain that the dominant-baseline
property didn't work? Do you mean that the property didn't change it at all?
The https://github.com/anseki/leader-line/issues/344 (not 334) is a topic about "Socket position".
And the JSFiddle example in the https://github.com/anseki/leader-line/issues/334 didn't use JS animation. Maybe you mistook a animateMotion
element of SVG to move an element. It is not JS animation, and it doesn't animate.
Yes, you're right animateMotion.
dominant-baseline
property placed with value : "middle" didn't placed the pathLable to the middle.
dominant-baseline
property placed with value : "hanging" placed the pathLable closer to middle, but not exactly
I see. Try this: https://jsfiddle.net/m12hc8sx/ You might have to consider compatibility with browsers. And note that this is not supported by the library.
Thank you :)
:smile:
Dear @anseki, thank you for the library!
It's needed to place a pathlabel in the middle of a leader-line path both horizontally and vertically. So the line goes through the text and direction matters
Your answer to the #334 issue was close, but js animation cannot be applied here due to the performance reasons I also played with the dominant-baseline css proprerty for textPath tag but it did't give me desired result - the label wasn't placed in the middle on a path neither horizontally nor vertically
How can it be done?