|
@@ -88,8 +88,7 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
|
|
|
}*/
|
|
|
// Format the voices
|
|
|
const allVoices: Vex.Flow.Voice[] = [];
|
|
|
- const formatter: Vex.Flow.Formatter = new Vex.Flow.Formatter({align_rests: true,
|
|
|
- });
|
|
|
+ const formatter: Vex.Flow.Formatter = new Vex.Flow.Formatter();
|
|
|
|
|
|
for (const measure of measures) {
|
|
|
const mvoices: { [voiceID: number]: Vex.Flow.Voice; } = (measure as VexFlowMeasure).vfVoices;
|
|
@@ -118,12 +117,13 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
|
|
|
// };
|
|
|
MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(measures, minStaffEntriesWidth);
|
|
|
for (const measure of measures) {
|
|
|
- measure.PositionAndShape.BorderRight = minStaffEntriesWidth;
|
|
|
if (measure === measures[0]) {
|
|
|
const vexflowMeasure: VexFlowMeasure = (measure as VexFlowMeasure);
|
|
|
// prepare format function for voices, will be called later for formatting measure again
|
|
|
vexflowMeasure.formatVoices = (w: number) => {
|
|
|
- formatter.format(allVoices, w);
|
|
|
+ formatter.format(allVoices, w, {
|
|
|
+ align_rests: true,
|
|
|
+ });
|
|
|
};
|
|
|
// format now for minimum width
|
|
|
vexflowMeasure.formatVoices(minStaffEntriesWidth * unitInPixels);
|