paulrosen/abcjs

Connection between SVG elements and the code

francoisschwarzentruber opened this issue · 2 comments

Hello,

as I see, click listener https://paulrosen.github.io/abcjs/visual/click-listener.html is rather powerful! When you click on an element, you obtain some information in the parameters abcelem and analysis. But it is limited to clicks.

What I may need is a function getInfo(svgElement) which returns an object containing the information given in abcelem and analysis. If such a function would exist, we could:

  • implement a behavior when the user hovers/enters/leave an element and not only when the user is clicking

We may also imagine the other way around. getSVGElement(positionInTheCode) which returns the SVG element that corresponds to the position in the code.

What do you think?

There is an internal array of elements that probably does what you want. I think I can make that public without complications. I hope to have a small update at the end of next week.

Thanks for the suggestion.

Will be fixed in 6.4.0