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

Element "Always On Top" Feature #37

Open
Lethalchip opened this issue Aug 18, 2024 · 0 comments
Open

Element "Always On Top" Feature #37

Lethalchip opened this issue Aug 18, 2024 · 0 comments
Assignees

Comments

@Lethalchip
Copy link
Member

This should be relatively easy to do with a simple rewrite of the zIndex system.

Currently when an element is selected by a guest, it calls UpdateElementZIndex on the server. This loops through all Elements getting the min and max zIndex. From there, we increment the recently selected element by the max+1. If the min and max exceed a ceiling threshold, the zIndex numbers are reset (this is to avoid an integer overflow for really really old/high traffic modules).

We could simply set a value: 900001, for example, that the min/max loop ignores, however I think this feature should allow multiple elements to be "Always On Top", which would require those elements to have their own layering within their high 900001 value. So probably what I'll do is make a range (of a few thousand) 900001-999999 that are excluded from the min/max loop and then still allow incrementing within that "Always On Top" range. Will also need a reset once that range hits the max as well.

Good luck future chippy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant