Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/rendering/glyphs/VoiceContainerGlyph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export class VoiceContainerGlyph extends GlyphGroup {
currentBeatGlyph.x -= graceSprings[currentBeatGlyph.beat.graceIndex].postSpringWidth;
// shift to right position of the particular grace note
currentBeatGlyph.x += graceSprings[currentBeatGlyph.beat.graceIndex].graceBeatWidth;
// move the whole group again forward for cases where another track has e.g. 3 beats and here we have only 2.
// so we shift the whole group of this voice to stick to the end of the group.
const lastGraceSpring = graceSprings[currentBeatGlyph.beat.graceGroup!.beats.length - 1];
currentBeatGlyph.x -= lastGraceSpring.graceBeatWidth;

} else {
// placement for improper grace beats where no beat in the same bar follows
let graceSpring = this.renderer.layoutingInfo.incompleteGraceRods.get(graceGroupId)!;
Expand Down
Binary file modified test-data/visual-tests/special-notes/grace-notes-advanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.