ソースを参照

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 年 前
コミット
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);