-
Notifications
You must be signed in to change notification settings - Fork 53
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
Make it possible to have more backgroud layers #1981
Comments
Dropdown would need to be dropup as the legend control's background layer pane is in the bottom of the window and then it would cover parts of the legend. That might and might not look problematic. The alternative is the way your last image shows , that the pane grows vertically to accomodate the dropdown. That might look a bit funny if there's a longer list of background layers I think. If the line simply grows up in the second picture then that looks better. Maybe that's the simplest solution. In a recent pr I was reportedly trying to solve this and we discussed it locally prior and "one button and a chooser that appears" is a popular thought, a bit like what maps.google.com does when the background layer button is hovered over. In order to fit something like that in the Origo legend ui something would need to stretch, though. A new element could be introduced above the background layer pane and the one above, with all the background layer choices and which would disappear when a choice was made. Can't tell for sure that that would look any better than your second image though. Maybe an element that floated could work. Anyway I kind of like the second image - wrap - for its simplicity. |
My first thought was also a new element, floating on top of the rest of the legend, kinda like the Add Layer button. But the wrap thing seems like the best option here. What it lacks in looks and elegance, it makes up for in simplicity and ease of use and implementation. |
All that is needed for the wrap solution is to remove height:50px and add max-width:300px to the top div for the background buttons. But in which source file do I find the code to change? |
src/controls/legend.js, line 701, I presume. |
The number of background layers is limited by the width of the layerswitcher. Find a way to fix this limitation.
![image](https://private-user-images.githubusercontent.com/5260503/315241107-c2442277-9a54-4c23-b61d-40d786d6a01c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2ODM1MzgsIm5iZiI6MTcyNTY4MzIzOCwicGF0aCI6Ii81MjYwNTAzLzMxNTI0MTEwNy1jMjQ0MjI3Ny05YTU0LTRjMjMtYjYxZC00MGQ3ODZkNmEwMWMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDdUMDQyNzE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjdhNWEwNjZiZGJhZmE2YmE1OTU1ZWE2MDM5OGQ5YTVmNTFkNDUyYjBlM2ViMjM3MDU3ODM4ZTUzMDVkMDQzYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.hPyp8Wpa_N2t72iIZJDbPdLcCegVaX71Im9cfDk3qrg)
Wrap the line of background icons?:
Option to have a dropdown for backgrounds (would also make it possible to add text description)?:
![image](https://private-user-images.githubusercontent.com/5260503/315245144-8e0feb71-80e5-422d-8e5c-96b23e194498.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2ODM1MzgsIm5iZiI6MTcyNTY4MzIzOCwicGF0aCI6Ii81MjYwNTAzLzMxNTI0NTE0NC04ZTBmZWI3MS04MGU1LTQyMmQtOGU1Yy05NmIyM2UxOTQ0OTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDdUMDQyNzE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWFkNDYzZGQ5ODljNzkzYzJjYTJhYzFhN2MzYzJhMWQ3MjE5ZDhhZDdmZDBjMjNiOWEyZWE5YjRjYTQ0MjhiMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.5Dv78lYkg9dYmdfGc4g0TEgb9WOo8bXXqd7HfTXjnew)
The text was updated successfully, but these errors were encountered: