Skip to content

Commit

Permalink
More fixes to show
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Sep 6, 2023
1 parent 7bc56e5 commit 7f0d0b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/abstractgeotable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ function Base.show(io::IO, ::MIME"text/plain", geotable::AbstractGeoTable)
end

function Base.show(io::IO, ::MIME"text/html", geotable::AbstractGeoTable)
pretty_table(io, geotable; backend=Val(:html), _common_kwargs(geotable)...)
pretty_table(io, geotable; backend=Val(:html),
_common_kwargs(geotable)...,
max_num_of_rows=10
)
end

function _common_kwargs(geotable)
Expand All @@ -374,7 +377,7 @@ function _common_kwargs(geotable)
# subheaders
tuples = map(names) do name
if name === :geometry
t = string(eltype(dom))
t = Meshes.prettyname(eltype(dom))
u = ""
else
x = Tables.getcolumn(cols, name)
Expand All @@ -392,5 +395,5 @@ function _common_kwargs(geotable)
types = first.(tuples)
units = last.(tuples)

(title=summary(geotable), header=(colnames, types, units), alignment=:c, max_num_of_rows=10, vcrop_mode=:middle)
(title=summary(geotable), header=(colnames, types, units), alignment=:c, vcrop_mode=:bottom)
end

0 comments on commit 7f0d0b6

Please sign in to comment.