File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ export class ScoreBarRenderer extends BarRendererBase {
353353
354354 public applyLayoutingInfo ( ) : boolean {
355355 const result = super . applyLayoutingInfo ( ) ;
356- if ( result ) {
356+ if ( result && this . bar . isMultiVoice ) {
357357 // consider rest overflows
358358 let top : number = this . getScoreY ( - 2 , 0 ) ;
359359 let bottom : number = this . getScoreY ( 6 , 0 ) ;
Original file line number Diff line number Diff line change @@ -150,15 +150,18 @@ export class ScoreBeatGlyph extends BeatOnNoteGlyphBase {
150150 this . restGlyph . beamingHelper = this . beamingHelper ;
151151 this . addGlyph ( this . restGlyph ) ;
152152
153- if ( this . container . beat . voice . index === 0 ) {
154- const restSizes = BeamingHelper . computeLineHeightsForRest ( this . container . beat . duration ) ;
155- let restTop = this . restGlyph . y - sr . getScoreHeight ( restSizes [ 0 ] ) ;
156- let restBottom = this . restGlyph . y + sr . getScoreHeight ( restSizes [ 1 ] ) ;
157- this . renderer . layoutingInfo . setBeatYPositions ( this . container . beat , restTop , restBottom ) ;
158- } else {
159- this . renderer . layoutingInfo . registerRest ( this . container . beat ) ;
153+ if ( this . renderer . bar . isMultiVoice ) {
154+ if ( this . container . beat . voice . index === 0 ) {
155+ const restSizes = BeamingHelper . computeLineHeightsForRest ( this . container . beat . duration ) ;
156+ let restTop = this . restGlyph . y - sr . getScoreHeight ( restSizes [ 0 ] ) ;
157+ let restBottom = this . restGlyph . y + sr . getScoreHeight ( restSizes [ 1 ] ) ;
158+ this . renderer . layoutingInfo . setBeatYPositions ( this . container . beat , restTop , restBottom ) ;
159+ } else {
160+ this . renderer . layoutingInfo . registerRest ( this . container . beat ) ;
161+ }
160162 }
161163
164+
162165 if ( this . beamingHelper ) {
163166 this . beamingHelper . applyRest ( this . container . beat , line ) ;
164167 }
You can’t perform that action at this time.
0 commit comments