|
@@ -58,13 +58,14 @@ export class Cursor {
|
|
|
}
|
|
|
this.graphic.Cursors.length = 0;
|
|
|
const iterator: MusicPartManagerIterator = this.iterator;
|
|
|
- if (iterator.EndReached || iterator.CurrentVoiceEntries === undefined || iterator.CurrentVoiceEntries.length === 0) {
|
|
|
+ const voiceEntries: VoiceEntry[] = iterator.CurrentVisibleVoiceEntries();
|
|
|
+ if (iterator.EndReached || iterator.CurrentVoiceEntries === undefined || voiceEntries.length === 0) {
|
|
|
return;
|
|
|
}
|
|
|
let x: number = 0, y: number = 0, height: number = 0;
|
|
|
|
|
|
// get all staff entries inside the current voice entry
|
|
|
- const gseArr: VexFlowStaffEntry[] = iterator.CurrentVoiceEntries.map(ve => this.getStaffEntriesFromVoiceEntry(ve));
|
|
|
+ const gseArr: VexFlowStaffEntry[] = voiceEntries.map(ve => this.getStaffEntriesFromVoiceEntry(ve));
|
|
|
// sort them by x position and take the leftmost entry
|
|
|
const gse: VexFlowStaffEntry =
|
|
|
gseArr.sort((a, b) => a.PositionAndShape.AbsolutePosition.x <= b.PositionAndShape.AbsolutePosition.x ? -1 : 1 )[0];
|