Closed calumk closed 2 years ago
Hi @calumk, thank you for the comment.
To begin with, the insProps
was implemented to avoid accessing via API. That is, the properties are private fields in old ECMAScript. In other words, the insProps
is not required if those are accessible, and those should be moved to instance properties.
Therefore, your plan means breaking the API design above obviously. And also, that should make more problems.
If you really want to do that, you can fork and customize the library to make a special one for your app. Or, you had better use another great library instead. The LeaderLine is inappropriate for your app maybe.
Is there some way you could consider modifying the API, such that it is possible to access the SVG, by accessing the line object, without breaking the api. I dont really mind how it exposes it, but access to the rendered SVG, from the PlainDraggable object, seems like a good idea?
For now i have forked the project
Sorry, my English is poor. Do you mean that you want to use LeaderLine with PlainDraggable and you can't do that?
Sorry - Typo
I dont really mind how it exposes it, but access to the rendered SVG, from the [LeaderLine] object, seems like a good idea?
No, that is not good idea.
You should not change the code if you can't understand why the insProps
exists.
You had better use another great library instead. The LeaderLine is inappropriate for your app. You maybe need a library as helper for handling SVG, the LeaderLine is not.
I have used leader-line extensivly over the last few years - So i disagree that it is inappropriate, but it is your library, your choice.
https://www.youtube.com/watch?v=OBI3qEEFtBg&feature=youtu.be
You may understand that when you learn the ECMAScript. :smile:
Is there some way I cannot figure out, that would allow me to expose the insProps?
If not, Would you be opposed to adding the following funtion?
It would really simplify exercises where we want to work around / append / modify the line.
For example, in the following code, we can only do the following at the point where the Line is created, (it uses the last-child)
https://jsfiddle.net/zmc6jywv/
But this would allow us to do the followng - (and if we store "line" we can do this any-time)