performLayout method

void performLayout(
  1. ChantContext ctxt
)

Implementation

void performLayout(ChantContext ctxt) {
  bounds = bounds.copyWith(
    x: note.bounds.x + bounds.width / 2,
  ); // center on the note itself

  // this puts the acute accent either over the staff lines, or over the note if the
  // note is above the staff lines
  setStaffPosition(
    ctxt,
    max(note.staffPosition + 1, 2 * ctxt.staffLineCount),
  );
}