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

composer label: update top border before placing label

related to changes in #578

prevents composer collision with very high notes in first music system
Simon Schmid преди 5 години
родител
ревизия
584b71f2e5
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      src/MusicalScore/Graphical/MusicSheetCalculator.ts

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

@@ -831,13 +831,17 @@ export abstract class MusicSheetCalculator {
                     staffLine.addActivitySymbolClickArea();
                 }
             }
+
+            // calculate TopBottom Borders for all elements recursively
+            graphicalMusicPage.PositionAndShape.calculateTopBottomBorders(); // necessary for composer label (page labels) for high notes in first system
+
             // calculate all Labels's Positions for the first Page
             if (graphicalMusicPage === this.graphicalMusicSheet.MusicPages[0]) {
                 this.calculatePageLabels(graphicalMusicPage);
             }
 
             // calculate TopBottom Borders for all elements recursively
-            graphicalMusicPage.PositionAndShape.calculateTopBottomBorders();
+            graphicalMusicPage.PositionAndShape.calculateTopBottomBorders(); // this is where top bottom borders were originally calculated (only once)
         }
     }