浏览代码

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)
         }
     }