positionPodatusMorae method
void
positionPodatusMorae(
- Note bottomNote,
- Note topNote
)
Implementation
void positionPodatusMorae(Note bottomNote, Note topNote) {
Mora? mark;
// The mora on the first (lower) note should be below it,
// if it is on a line.
if ((bottomNote.staffPosition.abs() % 2) == 1) {
if (bottomNote.morae.length == 1) {
mark = bottomNote.morae[0];
} else if (topNote.morae.length > 1) {
mark = topNote.morae[0];
}
if (mark != null &&
mark.positionHint == MarkingPositionHint.defaultHint) {
mark.positionHint = MarkingPositionHint.below;
}
}
// if there is a mora on the first note but not on the second, and the neume
// continues with a punctum higher than the second note, we need to adjust
// the space after the neume so that it follows immediately with no gap
if (bottomNote.morae.isNotEmpty && topNote.morae.isEmpty) {
bottomNote.morae[0].ignoreBounds = true;
}
}