vexflow
vexflow copied to clipboard
How do I know the note's x-position before it drawed?
For example,in the Tutorial (https://jsfiddle.net/8eckj32x/512/); I added two output statements before and after this sentence(voice.draw(context, stave);). like this: console.log(notes[0].getAbsoluteX()); voice.draw(context, stave); console.log(notes[0].getAbsoluteX());
The results are different.As one is 0,one is 79.9007.... Why is it?And I want know the notes's position before drawing.What should I do?
I think one way is specify stave on format:
var formatter = new VF.Formatter().joinVoices([voice]).format([voice], 400, {stave: stave});
https://jsfiddle.net/8eckj32x/560/