Преглед изворни кода

Merge branch 'feature-tianyong-newVersion' into ktyq-test-new

TIANYONG пре 8 месеци
родитељ
комит
19aa0c3373
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/helpers/formateMusic.ts

+ 4 - 0
src/helpers/formateMusic.ts

@@ -1009,6 +1009,10 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 			}
 
 			activeVerticalMeasureList = [note.sourceMeasure?.verticalMeasureList?.[0]] || [];
+			// 某些情况下,合并显示的妙极客曲子,note.sourceMeasure?.verticalMeasureList可能为空数组
+			if (state.isCombineRender && state.isEvxml && note.sourceMeasure?.verticalMeasureList.length === 0) {
+				activeVerticalMeasureList = osmd.GraphicSheet.MeasureList.find((item: any) => item[0].MeasureNumber === note.sourceMeasure.MeasureNumberXML) || [];
+			}
 			let currenrtVfVoices = activeVerticalMeasureList[0]?.vfVoices['1'] ? activeVerticalMeasureList[0]?.vfVoices['1'] : activeVerticalMeasureList[0]?.vfVoices['2'] ? activeVerticalMeasureList[0]?.vfVoices['2'] : null;
 			/**
 			 * TODO:多分轨合并的小节,音符可能没有id,此时就去其它分轨找