Browse Source

feat: noteId赋值修改

TIANYONG 1 week ago
parent
commit
aff9ebea92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/helpers/formateMusic.ts

+ 1 - 1
src/helpers/formateMusic.ts

@@ -1413,7 +1413,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 				isStaccato: note.voiceEntry.isStaccato(),
 				isRestFlag: note.isRestFlag,
 				// noteId: note.NoteToGraphicalNoteObjectId,
-				noteId: note.NoteToGraphicalNoteObjectId || `restNote${note.sourceMeasure.MeasureNumberXML}`,
+				noteId: note.NoteToGraphicalNoteObjectId === undefined ? `restNote${note.sourceMeasure.MeasureNumberXML}` : note.NoteToGraphicalNoteObjectId,
 				measureListIndex: note.sourceMeasure.measureListIndex,
 				MeasureNumberXML: note.sourceMeasure.MeasureNumberXML, // 当前的小节数,(从1开始)
 				_noteLength: _noteLength,