|
@@ -248,9 +248,11 @@ export class Cursor implements IPlaybackListener {
|
|
|
|
|
|
// y is common for both multirest and non-multirest, given the MusicSystem
|
|
|
y = musicSystem.PositionAndShape.AbsolutePosition.y + musicSystem.StaffLines[0]?.PositionAndShape.RelativePosition.y ?? 0;
|
|
|
+ let endY: number = musicSystem.PositionAndShape.AbsolutePosition.y;
|
|
|
const bottomStaffline: StaffLine = musicSystem.StaffLines[musicSystem.StaffLines.length - 1];
|
|
|
- const endY: number = musicSystem.PositionAndShape.AbsolutePosition.y +
|
|
|
- bottomStaffline.PositionAndShape.RelativePosition.y + bottomStaffline.StaffHeight;
|
|
|
+ if (bottomStaffline) {
|
|
|
+ endY += bottomStaffline.PositionAndShape.RelativePosition.y + bottomStaffline.StaffHeight;
|
|
|
+ }
|
|
|
height = endY - y;
|
|
|
|
|
|
// Update the graphical cursor
|