1
0

Fixed header generation

This commit is contained in:
cryptogopher 2020-05-26 22:43:33 +02:00
parent 2216cea6d5
commit 1bfe2f11fb

View File

@ -59,14 +59,15 @@ module BodyTrackersHelper
# ...then rowspans
single_columns = []
spec.each_with_index do |row, i|
single_columns.each { |q| row.delete(q) }
spec[1..-1].each_with_index do |row, i|
row.each do |q, span|
if span == 1
row[q] = -(spec.length - i)
# Current span nil and previous span == 1
if span.nil? && (spec[i][q] == 1)
spec[i][q] = -(spec.length - i)
single_columns << q
end
end
single_columns.each { |q| row.delete(q) }
end
spec