anseki / leader-line

Draw a leader line in your web page.
http://anseki.github.io/leader-line/
MIT License
3.03k stars 424 forks source link

arc of fixed height #352

Closed devashishp1999 closed 2 years ago

devashishp1999 commented 2 years ago

Hi, I want to make the arc of fixed height irrespective of the distance between two "div" elements.

JsFiddle Link to Demo code

Everything is perfect and I've got the desired result except 1 issue

Behind the scenes the library is using C = curveto for path. Can I modify It to Q = quadratic Bézier curve Manually? So that its height of the arc can be fixed between two elements.

Thanks for the amazing library

anseki commented 2 years ago

Hi @devashishp1999, thank you for the comment. You can access the <path> element via this:

document.getElementById('leader-line-1-line-path')

Note that it is not supported.

devashishp1999 commented 2 years ago

document.getElementById('leader-line-1-line-path') Not supported? Will this☝️ overwrite the <path> values that are set/generated by the library?

anseki commented 2 years ago

No, getElementById method doesn't change the element. It only gets the element. https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById

devashishp1999 commented 2 years ago

Firstly, thanks a lot for a response!

Yes, the method returns an element(s) for a CSS selector passed. I was asking, Is it not-supported by the library? or what you meant by that.

Actually I wanted to achieve following UI.

image

It's a number-line and a hopping arrow with some additional interaction features. I want the functionality like what I've shown in this jsFiddle.

I was struggling to create a triangle at the end & the Leader-Line has some more cool customisation features to implement without learning more about <svg>.

OR there could be an additional feature in Leader-Line library to create a line with these features.

Thanks for your time <3.

anseki commented 2 years ago

Yes, is it not supported by the library. Sorry, my English is poor.

anseki commented 2 years ago

[bot] No reply came, then this abandoned issue is closed.