Fixed header generation
This commit is contained in:
parent
2216cea6d5
commit
1bfe2f11fb
@ -59,14 +59,15 @@ module BodyTrackersHelper
|
|||||||
|
|
||||||
# ...then rowspans
|
# ...then rowspans
|
||||||
single_columns = []
|
single_columns = []
|
||||||
spec.each_with_index do |row, i|
|
spec[1..-1].each_with_index do |row, i|
|
||||||
single_columns.each { |q| row.delete(q) }
|
|
||||||
row.each do |q, span|
|
row.each do |q, span|
|
||||||
if span == 1
|
# Current span nil and previous span == 1
|
||||||
row[q] = -(spec.length - i)
|
if span.nil? && (spec[i][q] == 1)
|
||||||
|
spec[i][q] = -(spec.length - i)
|
||||||
single_columns << q
|
single_columns << q
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
single_columns.each { |q| row.delete(q) }
|
||||||
end
|
end
|
||||||
|
|
||||||
spec
|
spec
|
||||||
|
Reference in New Issue
Block a user