File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
crates/notation_bevy/src/settings Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,11 @@ impl LayoutSettings {
133133 ) -> f32 {
134134 let ( row, col) = grid_data. calc_row_col ( pos_data. bar_position . bar_ordinal - 1 ) ;
135135 let mut y = pos_data. bar_layout . offset . y ;
136- if row > 0 {
137- let grid_size = layout. size ;
138- let content_size = grid_data. content_size ;
136+ let grid_size = layout. size ;
137+ let content_size = grid_data. content_size ;
138+ if grid_size. height > content_size. height {
139+ y = -( grid_size. height - content_size. height ) ;
140+ } else if row > 0 {
139141 let last_row_height = grid_data. calc_cell_size ( row - 1 , col) . height ;
140142 if last_row_height + pos_data. bar_layout . size . height <= grid_size. height / 2.0 {
141143 y = grid_data. calc_cell_offset ( row - 1 , col) . y ;
You can’t perform that action at this time.
0 commit comments