Ver código fonte

fix(VexFlowStaffEntry): undefined staff entry parent

This method is called on instances that do not carry the member `staffEntryParent` along. Luckily they do feature the `parentMeasure` member.
Daniel Fürst 5 anos atrás
pai
commit
9b449250fd

+ 1 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowStaffEntry.ts

@@ -39,7 +39,7 @@ export class VexFlowStaffEntry extends GraphicalStaffEntry {
                     // whole rest: length = measure length. (4/4 in a 4/4 time signature, 3/4 in a 3/4 time signature, 1/4 in a 1/4 time signature, etc.)
                     // see Note.isWholeRest(), which is currently not safe
                     this.PositionAndShape.RelativePosition.x +=
-                        this.staffEntryParent.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow - 0.1; // xShift from VexFlowConverter
+                        this.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow - 0.1; // xShift from VexFlowConverter
                     gve.PositionAndShape.BorderLeft = -0.7;
                     gve.PositionAndShape.BorderRight = 0.7;
                 }