add class to stavenote?

42 views
Skip to first unread message

Дмитрий Дегтярёв

unread,
Jan 17, 2018, 4:52:18 PM1/17/18
to vexflow
hi
i was wondering if there is a way to add class or data attribute to staveNote for accessing through DOM? 
i can set id 
const staveNote = new VF.StaveNote(note);

staveNote
.setAttribute('id', note.id);

but 
staveNote.addClass('my-class');

or

staveNote
.attrs.classes['my-class'] = true;


doesnt work

Thanks.
Reply all
Reply to author
Forward
0 new messages