|
@@ -969,9 +969,10 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
// } else {
|
|
|
// activeVerticalMeasureList = [note.sourceMeasure?.verticalMeasureList?.[0]] || [];
|
|
|
// }
|
|
|
+
|
|
|
// 合并展示某些分轨,需要把展示的分轨筛选出来
|
|
|
if (state.isCombineRender && note.sourceMeasure.verticalMeasureList.length) {
|
|
|
- note.sourceMeasure.verticalMeasureList = note.sourceMeasure?.verticalMeasureList.filter((item: any) => state.canSelectTracks.includes(item.parentStaff.parentInstrument.Name))
|
|
|
+ note.sourceMeasure.verticalMeasureList = note.sourceMeasure?.verticalMeasureList.filter((item: any) => state.canSelectTracks.includes(item?.parentStaff?.parentInstrument.Name))
|
|
|
}
|
|
|
|
|
|
activeVerticalMeasureList = [note.sourceMeasure?.verticalMeasureList?.[0]] || [];
|
|
@@ -982,7 +983,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
const vmLength = note.sourceMeasure?.verticalMeasureList?.length
|
|
|
let currentVmIndex = 0;
|
|
|
let hasSvgElement = currenrtVfVoices?.tickables[staveNoteIndex];
|
|
|
- while (!hasSvgElement && vmLength > 1 && currentVmIndex <= vmLength - 1) {
|
|
|
+ while (!hasSvgElement && vmLength > 1 && currentVmIndex <= vmLength - 1 && currenrtVfVoices !== null) {
|
|
|
currentVmIndex += 1;
|
|
|
activeVerticalMeasureList = [note.sourceMeasure?.verticalMeasureList?.[currentVmIndex]] || [];
|
|
|
currenrtVfVoices = activeVerticalMeasureList[0]?.vfVoices['1'] ? activeVerticalMeasureList[0]?.vfVoices['1'] : activeVerticalMeasureList[0]?.vfVoices['2'] ? activeVerticalMeasureList[0]?.vfVoices['2'] : null;
|