瀏覽代碼

added TODO for casting/typing

sschmidTU 7 年之前
父節點
當前提交
861f33a400
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

+ 5 - 0
src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

@@ -615,6 +615,11 @@ export class VexFlowMeasure extends GraphicalMeasure {
             // create vex flow articulation:
             const graphicalVoiceEntries: GraphicalVoiceEntry[] = graphicalStaffEntry.graphicalVoiceEntries;
             for (const gve of graphicalVoiceEntries) {
+                // TODO this is a lot of casting, and a VexFlowVoiceEntry is not supposed to have a StaveNote,
+                //  only a StemmableNote, which is a superclass of StaveNote, meaning StaveNote has more functionality.
+                // so, either VexFlowVoiceEntry should have a StaveNote member again instead of StemmableNote,
+                //  or we need to get the StaveNote from somewhere else.
+                // same issue in createOrnaments(). [sschmid]
                 const vfStaveNote: StaveNote = ((gve as VexFlowVoiceEntry).vfStaveNote as StaveNote);
                 VexFlowConverter.generateArticulations(vfStaveNote, gve.notes[0].sourceNote.ParentVoiceEntry.Articulations);
             }