lib/hexapdf/layout/table_box.rb in hexapdf-0.34.1 vs lib/hexapdf/layout/table_box.rb in hexapdf-0.35.0
- old
+ new
@@ -110,12 +110,12 @@
# composer.table(cells)
#
# Each table can have header rows and footer rows which are shown for all split parts:
#
# #>pdf-composer
- # header = lambda {|tb| [[{content: layout.text('Header', align: :center), col_span: 2}]] }
- # footer = lambda {|tb| [[layout.text('left'), layout.text('right', align: :right)]] }
+ # header = lambda {|tb| [[{content: layout.text('Header', text_align: :center), col_span: 2}]] }
+ # footer = lambda {|tb| [[layout.text('left'), layout.text('right', text_align: :right)]] }
# cells = [[layout.text('A'), layout.text('B')],
# [layout.text('C'), layout.text('D')],
# [layout.text('E'), layout.text('F')]]
# composer.column(height: 90) {|col| col.table(cells, header: header, footer: footer) }
#
@@ -586,10 +586,10 @@
# Returns +true+ if not a single row could be fit.
def empty?
super && (!@last_fitted_row_index || @last_fitted_row_index < 0)
end
- # Fits the table into the available space.
+ # Fits the table into the current region of the frame.
def fit(available_width, available_height, frame)
return false if (@initial_width > 0 && @initial_width > available_width) ||
(@initial_height > 0 && @initial_height > available_height)
# Adjust reserved width/height to include space used by the edge cells for their border