瀏覽代碼

test: fix Vexflow warning

sschmid 5 年之前
父節點
當前提交
1b52fee707
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      test/Common/OSMD/OSMD_Test.ts

+ 5 - 1
test/Common/OSMD/OSMD_Test.ts

@@ -359,8 +359,12 @@ describe("OpenSheetMusicDisplay Main Export", () => {
                     voiceEntry,
                     voiceEntry.ParentSourceStaffEntry,
                     new Fraction(1),
-                    new Pitch(11, 1, AccidentalEnum.NATURAL));
+                    new Pitch(11, 2, AccidentalEnum.NATURAL));
+                    // note: if the pitch is such that the voice entry frequencies aren't ordered correctly,
+                    // Vexflow will complain about unsorted pitches. see below
                 voiceEntry.Notes.push(newNote);
+                // we could do something like voiceEntry.sort() here to prevent the Vexflow warning about unsorted pitches,
+                // but for now sort() only exists on GraphicalVoiceEntry.
 
                 opensheetmusicdisplay.updateGraphic();