abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Get current clef

Open ehsansh opened this issue 3 years ago • 3 comments

When I click on a note how could I find what the clef is in this measure?

ehsansh avatar Aug 16 '22 08:08 ehsansh

No one's asked for this before. I assume you have a click handler like this:

function clickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent)

analysis.voice and analysis.line might have enough clues for you to see. Otherwise, I'm not sure but you can poke around the returned info and see if anything else helps. abcelem.startchar perhaps?

paulrosen avatar Aug 16 '22 15:08 paulrosen

以前没有人要求过这个。我假设你有一个像这样的点击处理程序:

function clickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent)

analysis.voice并且analysis.line可能有足够的线索供你查看。否则,我不确定,但您可以查看返回的信息,看看是否有其他帮助。abcelem.startchar也许?

Why are there no voice and line attributes in the analysis object returned by clicking in my version?

MooLee89 avatar May 08 '24 09:05 MooLee89

Can I see a small abc string and your javascript? Maybe I can figure out where the problem is.

paulrosen avatar May 12 '24 16:05 paulrosen