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

show/hideOverlay #2431

Closed
bubblobill opened this issue Mar 3, 2021 · 4 comments
Closed

show/hideOverlay #2431

bubblobill opened this issue Mar 3, 2021 · 4 comments
Labels
feature Adding functionality that adds value Hacktoberfest macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)

Comments

@bubblobill
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I want an overlay that displays when it is appropriate and is hidden when it is not. Presently the only automation option is to close the overlay and recreate it when needed.

Describe the solution you'd like
A macro function that utilises the ability to toggle the display of overlays.
This can be done manually through the menu but I would rather not override that client-side preference.

Describe alternatives you've considered
New JS functions may allow updating visibility through manipulating CSS. Haven't checked them out to see if this functionality exists.

Additional context

@bubblobill bubblobill added the feature Adding functionality that adds value label Mar 3, 2021
@melek
Copy link
Collaborator

melek commented Mar 27, 2021

I'm unsure, since the point of having the overlays be optional to each client is to give clients control over the overlays. For instance, I disable overlays occasionally at present due to the bug where an overlay can make it impossible to drag items onto the map.

With this, overlays could bypass user intent. I think removing the overlay, or hiding the overlay with something like a conditional body { display: none; } via JS are both good solutions. You could also use a big container div to toggle display, so you could keep a visible widget to flip the switch.

@Phergus Phergus added the macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) label Oct 18, 2021
@Phergus
Copy link
Contributor

Phergus commented Oct 18, 2021

@bubblobill does this work for you?

[r: setOverlayVisible(OverlayName, {1|0})]
[r: visible = isOverlayVisible(OverlayName)] // returns 1|0

@Phergus Phergus added the documentation needed Missing, out-of-date or bad documentation label Oct 18, 2021
@bubblobill
Copy link
Collaborator Author

Looks good to me.

@Phergus
Copy link
Contributor

Phergus commented Oct 20, 2021

@Phergus Phergus removed the documentation needed Missing, out-of-date or bad documentation label Oct 20, 2021
@Phergus Phergus closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value Hacktoberfest macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)
Projects
None yet
Development

No branches or pull requests

3 participants