hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
36 stars 20 forks source link

Map size ignored when window too small on startup #2797

Closed jmacura closed 2 years ago

jmacura commented 2 years ago

Bug

Describe the bug When the test-app is loaded with a small (in height) window, it does not split the window in half for each app, but instead the first app is loaded in full-screen mode and the other is placed below it.

To Reproduce Steps to reproduce the behavior:

  1. Start test-app with a tiny browser window
  2. See only one app in the view

Expected behavior Not sure, really, but the behaviour described above is not consistent. The size of the window when a page is loaded should not matter.

Screenshots When the window is large on load time and shrink only later, the behaviour is expectable. image When the window is too small in height on startup, the first app goes full-screen while the second is below it. image When resizing the window, the other app reveals itself just briefly image ...then it also hides, leaving a part of the map blank image

Additional context It might be as well only a problem in the test-app itself and not affecting the hslayers library. In that case, this is rather a non-issue and it can be safely ignored 🙂

FilipLeitner commented 2 years ago

Good find. Its because of the failed asumption that app should be in 'full-screen' mode when height is less than 350px. Forced the defined height no matter the value so the behavior is more predictable. bebd6650122733506c6bdad99ff4237b52b33557

raitisbe commented 2 years ago

Gonna cherry pick this 37170b4738fce1ea9331b420b505ede381b6f931 commit too

raitisbe commented 2 years ago

Seems to be solved