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

Z-index on elements saving versus loading #105

Open
Cdetviler opened this issue Apr 20, 2016 · 2 comments
Open

Z-index on elements saving versus loading #105

Cdetviler opened this issue Apr 20, 2016 · 2 comments
Labels

Comments

@Cdetviler
Copy link

Jim demonstrated an issue where he placed two cameras on the page one on top of the other, and when he loaded the layout later, the z-index had switched. It was unclear what the z-index was of each camera, but since Jim did not mention changing the z-index, it is safe to assume that they were at their default - 100.

If I had to guess the reason why this happens it is because a new element added overlaps an element that was added previously.

Loading must switch the order somehow. Interesting enough, it only seems to happen with camera objects. If I had to guess, I would say that it is because when loading the camera objects, the image is preloaded.

So basically:

camera 1 = 1028KB in size
camera 2 = 500KB in size

Even if camera 1 was initiated first by the load function, camera 2 would most likely be created first. Thus switching the order.

@Cdetviler Cdetviler added the bug label Apr 20, 2016
@kb0thn
Copy link

kb0thn commented Apr 20, 2016

When creating the page, I would not set the z-index to be all the same.
Set the z-index so each item gets a higher (or whatever closer to the
front is) index.

On 4/20/2016 9:20 AM, Charlie Detviler wrote:

Jim demonstrated an issue where he placed two cameras on the page one on
top of the other, and when he loaded the layout later, the z-index had
switched. It was unclear what the z-index was of each camera, but since
Jim did not mention changing the z-index, it is safe to assume that they
were at their default - 100.

If I had to guess the reason why this happens it is because a new
element added overlaps an element that was added previously.

Loading must switch the order somehow. Interesting enough, it only seems
to happen with camera objects. If I had to guess, I would say that it is
because when loading the camera objects, the image is preloaded.

So basically:

camera 1 = 1028KB in size
camera 2 = 500KB in size

Even if camera 1 was initiated first by the load function, camera 2
would most likely be created first. Thus switching the order.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#105

-James Jefferson Jarvis
APRS World, LLC
+1-507-454-2727
www.aprsworld.com

Cdetviler pushed a commit that referenced this issue Apr 20, 2016
Cameras, when loading, now generate html first and then the image is loaded. This should prevent the z-index from getting messed up on cameras when they are loaded in.
Cdetviler pushed a commit that referenced this issue Apr 21, 2016
@Cdetviler
Copy link
Author

Cdetviler commented Apr 21, 2016

Items added to the page now have incremental z-index instead of being set automatically to 100. The z-index slider in the edit pane also reflects this by having the high-end of its range set to 100+number_of_elements_on_page, incrementing for every element that is added to the page. Unfortunately layouts that were saved previously to this will not see any change because I didn't want to override any z-index that were manually changed by the user.

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

No branches or pull requests

2 participants