lib/hexapdf/layout/table_box.rb in hexapdf-0.39.0 vs lib/hexapdf/layout/table_box.rb in hexapdf-0.39.1

- old
+ new

@@ -415,11 +415,12 @@ else last_fitted_row_index = columns.min_by(&:row).row - 1 if height != available_height break end end - [height - available_height, last_fitted_row_index] + + [height - available_height, last_fitted_row_index < start_row ? -1 : last_fitted_row_index] end # Draws the rows from +start_row+ to +end_row+ on the given +canvas+, with the top-left # corner of the resulting table being at (+x+, +y+). def draw_rows(start_row, end_row, canvas, x, y) @@ -645,10 +646,10 @@ position += result[1] result end end - # Splits the content of the column box. This method is called from Box#split. + # Splits the content of the table box. This method is called from Box#split. def split_content(_available_width, _available_height, _frame) if @special_cells_fit_not_successful || @last_fitted_row_index < 0 [nil, self] else box = create_split_box