浏览代码

refactor(GraceNotes): remove GraceStaffEntries
closes #56

sschmidTU 7 年之前
父节点
当前提交
ae255c717d

+ 0 - 4
src/MusicalScore/Graphical/GraphicalStaffEntry.ts

@@ -26,8 +26,6 @@ export abstract class GraphicalStaffEntry extends GraphicalObject {
         super();
         this.parentMeasure = parentMeasure;
         this.graphicalVoiceEntries = [];
-        this.graceStaffEntriesBefore = [];
-        this.graceStaffEntriesAfter = [];
         this.sourceStaffEntry = sourceStaffEntry;
         if (staffEntryParent !== undefined) {
             this.staffEntryParent = staffEntryParent;
@@ -49,8 +47,6 @@ export abstract class GraphicalStaffEntry extends GraphicalObject {
     public sourceStaffEntry: SourceStaffEntry;
     public parentMeasure: GraphicalMeasure;
     public graphicalVoiceEntries: GraphicalVoiceEntry[];
-    public graceStaffEntriesBefore: GraphicalStaffEntry[];
-    public graceStaffEntriesAfter: GraphicalStaffEntry[];
     public staffEntryParent: GraphicalStaffEntry;
     public parentVerticalContainer: VerticalGraphicalStaffEntryContainer;
 

+ 0 - 12
src/MusicalScore/Graphical/VexFlow/VexFlowGraphicalSymbolFactory.ts

@@ -77,18 +77,6 @@ export class VexFlowGraphicalSymbolFactory implements IGraphicalSymbolFactory {
         return new VexFlowStaffEntry(<VexFlowMeasure>measure, sourceStaffEntry, undefined);
     }
 
-    /**
-     * Create an empty staffEntry which will be used for grace notes.
-     * it will be linked to the given staffEntryParent, which is a staffEntry for normal notes.
-     * Grace notes are almost always given before (rarely also after) normal notes.
-     * @param staffEntryParent
-     * @param measure
-     * @returns {VexFlowStaffEntry}
-     */
-    public createGraceStaffEntry(staffEntryParent: GraphicalStaffEntry, measure: GraphicalMeasure): GraphicalStaffEntry {
-        return new VexFlowStaffEntry(<VexFlowMeasure>measure, undefined, <VexFlowStaffEntry>staffEntryParent);
-    }
-
     public createVoiceEntry(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry): GraphicalVoiceEntry {
         return new VexFlowVoiceEntry(parentVoiceEntry, parentStaffEntry);
     }

+ 0 - 2
src/MusicalScore/Interfaces/IGraphicalSymbolFactory.ts

@@ -28,8 +28,6 @@ export interface IGraphicalSymbolFactory {
 
     createStaffEntry(sourceStaffEntry: SourceStaffEntry, measure: GraphicalMeasure): GraphicalStaffEntry;
 
-    createGraceStaffEntry(staffEntryParent: GraphicalStaffEntry, measure: GraphicalMeasure): GraphicalStaffEntry;
-
     createVoiceEntry(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry): GraphicalVoiceEntry;
 
     createNote(