Skip to content

[BUGFIX] Set default height for PageView map container - #2151

Merged
sebastian-meyer merged 2 commits into
kitodo:mainfrom
stweil:fix/pageview-map-default-height
Sep 18, 2026
Merged

sebastian-meyer merged 2 commits into
kitodo:mainfrom
stweil:fix/pageview-map-default-height

Conversation

@stweil

@stweil stweil commented Sep 18, 2026

Copy link
Copy Markdown
Member

The map container (#tx-dlf-map) normally gets its height from the theme CSS. The extension itself ships no stylesheet for it, so on an installation without a theme the container is 0 pixels tall and OpenLayers renders nothing at all ("No map visible because the map container's width or height are 0").

Apply a fallback height (57 em, as used by the UB Mannheim theme) in dlfViewer when the computed container height is 0. Explicit theme CSS is unaffected, since the fallback only applies when no height is set.

Assisted-by: OpenCode / qwen3.8-27b-thinking (Alibaba Cloud)

The map container (#tx-dlf-map) normally gets its height from the
theme CSS. The extension itself ships no stylesheet for it, so on an
installation without a theme the container is 0 pixels tall and
OpenLayers renders nothing at all ("No map visible because the map
container's width or height are 0").

Apply a fallback height (57 em, as used by the UB Mannheim theme) in
dlfViewer when the computed container height is 0. Explicit theme CSS
is unaffected, since the fallback only applies when no height is set.

Assisted-by: OpenCode / qwen3.8-27b-thinking (Alibaba Cloud)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
@sebastian-meyer sebastian-meyer added the ☇ bug A non-security related bug. label Sep 18, 2026
@sebastian-meyer
sebastian-meyer merged commit 40d2315 into kitodo:main Sep 18, 2026
10 checks passed
@stweil
stweil deleted the fix/pageview-map-default-height branch September 18, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☇ bug A non-security related bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants