Просмотр исходного кода

fix(skyline): Measure number skyline offset
The staffline offset was only being taken into account for the first staffline. Removed this check

Justin Litten 5 лет назад
Родитель
Сommit
b97439e3e5
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      src/MusicalScore/Graphical/MusicSheetCalculator.ts

+ 2 - 5
src/MusicalScore/Graphical/MusicSheetCalculator.ts

@@ -372,11 +372,8 @@ export abstract class MusicSheetCalculator {
         let start: number = relativeX;
         let end: number = relativeX - graphicalLabel.PositionAndShape.BorderLeft + graphicalLabel.PositionAndShape.BorderMarginRight;
 
-        // take into account the InstrumentNameLabel's at the beginning of the first MusicSystem
-        if (staffLine === musicSystem.StaffLines[0] && musicSystem === this.musicSystems[0]) {
-            start -= staffLine.PositionAndShape.RelativePosition.x;
-            end -= staffLine.PositionAndShape.RelativePosition.x;
-        }
+        start -= staffLine.PositionAndShape.RelativePosition.x;
+        end -= staffLine.PositionAndShape.RelativePosition.x;
 
         // get the minimum corresponding SkyLine value
         const skyLineMinValue: number = skyBottomLineCalculator.getSkyLineMinInRange(start, end);