Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set maxheight for layer search #1886

Merged
merged 7 commits into from
Nov 3, 2023
Merged

Conversation

jokd
Copy link
Contributor

@jokd jokd commented Nov 1, 2023

Fixes #1827
Set max height element containing search result so it won't overflow the legend container and make it scrollable. Also set the width to match the legend.

image

@asemoller
Copy link
Contributor

I haven't tested this one but how are searches handled if the legend only contains a collapsed group with many layers like in issue #1641?

@jokd
Copy link
Contributor Author

jokd commented Nov 1, 2023

I haven't tested this one but how are searches handled if the legend only contains a collapsed group with many layers like in issue #1641?

It will look half decent. The max-height is set as if the legend was full height so it will overflow the legend when it is smaller so I was lying a bit in my previous comment:
image

Dunno if there's a better way of doing it.

@jokd
Copy link
Contributor Author

jokd commented Nov 1, 2023

Maybe its enough to set max height to 50% of the legend max height, at least this scenario will look better

@asemoller
Copy link
Contributor

asemoller commented Nov 1, 2023

Tested it and 50% works fine. I don't get a scroll in the search result though.
I had the option "searchLayersLimit": 10" which made it look like 50% and of course the scrolling didn't appear, my bad! 😄

However, this still applies:
And without turn-off-layers button and turn-on-layers button in the legend, neither close button, visible layers button nor background maps work. 😞

@jokd
Copy link
Contributor Author

jokd commented Nov 2, 2023

Tested it and 50% works fine. I don't get a scroll in the search result though. I had the option "searchLayersLimit": 10" which made it look like 50% and of course the scrolling didn't appear, my bad! 😄

However, this still applies: And without turn-off-layers button and turn-on-layers button in the legend, neither close button, visible layers button nor background maps work. 😞

Right on, now its fixed and the height is set to approx half the max height of the legend. Fixed scrolling for the search control as well

@jokd jokd changed the title Set maxheight for layer search fix: set maxheight for layer search Nov 2, 2023
@asemoller
Copy link
Contributor

Yes, the legend search works well!

@jokd jokd merged commit 907a77d into master Nov 3, 2023
4 checks passed
@jokd jokd deleted the maxheight-for-legendsearch branch November 3, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Legend search results
2 participants