First of all, I don't really know much about music theory and I'm new to VexFlow. So please let me know if I have misunderstood anything.
In all the musical notation software I have tried to use, rests are by default rendered at the following positions:
Now I'm trying to respect the *default* positions of rests using VexFlow. For all but the whole rest, I found that VexFlow would just render them at the desired positions if I specify the key as "b/4" (treble clef). But for whole rest, it is rendered one line lower.
var stave1 = new Vex.Flow.Stave(0, 0, 150),
stave2 = new Vex.Flow.Stave(150, 0, 300),
notes1 = [
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "wr" })
],
notes2 = [
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "hr" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "qr" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "8r" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "16r" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "32r" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "64r" }),
new Vex.Flow.StaveNote({ keys: ["b/4"], duration: "64r" })
];
stave1.setContext(ctx).draw();
stave2.setContext(ctx).draw();
Vex.Flow.Formatter.FormatAndDraw(ctx, stave1, notes1);
Vex.Flow.Formatter.FormatAndDraw(ctx, stave2, notes2);
I suspect this is a bug or improper design. Because it is inconsistent. Also I tested this in MusicXML & Finale. When I set the display step and octave of rest to b/4 and import the MusicXML to Finale, it is rendered just as expected. But when I set it to d/5, which is rendered at the desired position in VexFlow, it is rendered one line upper.

Could someone please explain this and let me know if it would be fixed someday in the future? Actually I'm fine to follow the behavior of VexFlow and instead do some work in my own code. But my concern is my app may fail if the behavior were to change in the future.
By the way, I have another question. As in my VexFlow test above, the single whole rest is rendered at the left side of the staff. How can I make it center aligned?
Great thanks in advance!