KamiFightingSpirit Posted April 3, 2020 Share Posted April 3, 2020 I have a container that is filled with objects, each of these objects have children. When the user hovers over the objects the children appear visually on the screen. However, the children do not appear in front of all objects in the grandfather container, only it's immediate parent. Is there a way to make it appear in front of all objects in the grandfather container as well? Quote Link to comment Share on other sites More sharing options...
leeda Posted April 3, 2020 Share Posted April 3, 2020 Is your problem hierarchical? Quote Link to comment Share on other sites More sharing options...
KamiFightingSpirit Posted April 3, 2020 Author Share Posted April 3, 2020 What do you mean by hierarchical? Quote Link to comment Share on other sites More sharing options...
KamiFightingSpirit Posted April 3, 2020 Author Share Posted April 3, 2020 (edited) I believe it is happening because the higher z-indexed parent's siblings are always indexed higher than the children of that parent ( their nieces/nephews). Is there a way to remove the connection between the parent's z-index and it's children and instead just use a global z-index? Edited April 3, 2020 by KamiFightingSpirit Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 3, 2020 Share Posted April 3, 2020 Here's the plugin for it: https://github.com/pixijs/pixi-layers You can see "z-index" word in examples and use it with CTRL+C but I advice you to go through the README. Layers are better than z-index. 1. You might even not need to set numbers for z-index 2. Its clear how masks and filters work in those elements. KamiFightingSpirit 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.