Преглед на файлове

fix: 曲谱:合奏2-14,跳过倚音

TIANYONG преди 1 година
родител
ревизия
cb2fdf90ee
променени са 1 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 11 1
      src/pages/detail/helpers.ts

+ 11 - 1
src/pages/detail/helpers.ts

@@ -236,12 +236,22 @@ export const getAllNodes = (osmd: any) => {
       if (state.isCombineRender) {
         for (let index = 0; index < iterator.currentVoiceEntries.length; index++) {
           const element = iterator.currentVoiceEntries[index];
+          /** 
+           * 曲谱:合奏2-14,1752154261147389954,跳过倚音
+           */
+          if (element.isGrace) {
+            if (minIndex == index && minIndex == 0) {
+              minIndex = iterator.currentVoiceEntries.length > 1 ? 1 : 0
+            }
+            continue
+          }
           if (element.notes[0].length.realValue < elRealValue) {
             minIndex = index
           }
           elRealValue = element.notes[0].length.realValue
         }
       }
+      
       let voiceEntries = iterator.currentVoiceEntries?.[0] ? [iterator.currentVoiceEntries?.[0]] : []
       const voiceEntries2 = iterator.currentVoiceEntries?.[1]
       if (state.isCombineRender) {
@@ -513,7 +523,7 @@ export const getAllNodes = (osmd: any) => {
             NoteToGraphicalNoteObjectId: note.NoteToGraphicalNoteObjectId,
             cursorBox,
             skipNextNote,
-            measureNumberPrinted,
+            measureNumberPrinted, // 当前小节数(从1开始)
             difftime,
             octaveOffset: activeVerticalMeasureList[0]?.octaveOffset,
             frequency: note.pitch?.frequency,