Преглед на файлове

fix: fixed showing the staveconnector of multi-staved instruments at the end of the system.

Matthias Uiberacker преди 7 години
родител
ревизия
46ca911b0c
променени са 2 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 6 2
      src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts
  2. 1 1
      src/MusicalScore/Graphical/VexFlow/VexFlowMusicSystem.ts

+ 6 - 2
src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts

@@ -17,6 +17,7 @@ import {Fonts} from "../../../Common/Enums/Fonts";
 import {OutlineAndFillStyleEnum, OUTLINE_AND_FILL_STYLE_DICT} from "../DrawingEnums";
 import {Logging} from "../../../Common/Logging";
 import { ArticulationEnum, StemDirectionType } from "../../VoiceData/VoiceEntry";
+import { SystemLinePosition } from "../SystemLinePosition";
 
 /**
  * Helper class, which contains static methods which actually convert
@@ -424,10 +425,13 @@ export class VexFlowConverter {
      * @param lineType
      * @returns {any}
      */
-    public static line(lineType: SystemLinesEnum): any {
+    public static line(lineType: SystemLinesEnum, linePosition: SystemLinePosition): any {
         switch (lineType) {
             case SystemLinesEnum.SingleThin:
-                return Vex.Flow.StaveConnector.type.SINGLE;
+                if (linePosition === SystemLinePosition.MeasureBegin) {
+                    return Vex.Flow.StaveConnector.type.SINGLE;
+                }
+                return Vex.Flow.StaveConnector.type.SINGLE_RIGHT;
             case SystemLinesEnum.DoubleThin:
                 return Vex.Flow.StaveConnector.type.DOUBLE;
             case SystemLinesEnum.ThinBold:

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

@@ -44,7 +44,7 @@ export class VexFlowMusicSystem extends MusicSystem {
         if (bottomMeasure) {
           // ToDo: feature/Repetitions
           // create here the correct lines according to the given lineType.
-          (bottomMeasure as VexFlowMeasure).lineTo(topMeasure as VexFlowMeasure, VexFlowConverter.line(lineType));
+          (bottomMeasure as VexFlowMeasure).lineTo(topMeasure as VexFlowMeasure, VexFlowConverter.line(lineType, linePosition));
           (bottomMeasure as VexFlowMeasure).addMeasureLine(lineType, linePosition);
         }
         return new SystemLine(lineType, linePosition, this, topMeasure, bottomMeasure);