PDA

View Full Version : Use ZIndexManager on non-floating component?



JamaSoftware-Sencha
13 Apr 2012, 1:56 PM
Hi there,

I want to have a non-floating component supply a z-index manager to descendant components, but I don't want the component to be floating: true. This is because this component is rendered into the normal page flow, but at a certain topScroll, I move this component to fixed positioning so that it stays with the user as they scroll. In this component I'm rendering ComboBoxes, and they are not getting their z-indexes set properly since this component isn't floating.

Is there any suggested ways to handle this situation, or any good workarounds?

Looking through the source code, Ext is always checking "this.up('[floating]')", so it would seem I need to set floating=true on my component. However, I need its dom rendered into the page flow upon creation.

Any thoughts or suggestions are greatly appreciated.

mitchellsimoens
16 Apr 2012, 8:21 AM
If you set floating it will make that component float which you said isn't what you want. Kind of sounds like you do when it gets the fixed positioning. ZIndexManager won't work on non-floating components, you will need to handle it yourself.

JamaSoftware-Sencha
16 Apr 2012, 8:30 AM
That makes sense, although I think a little abstraction could be added to allow for this kind of pluggability.

If instead of components asking "Who above me is floating?", they asked, "Who above me knows how to give me my z-index?", which is what they really want, then this would be a non-issue. I could create a component that is marked as a "z-index provider" or something, and descendants would know to come to me for their z-index manager.

Does Sencha accept suggestions from the community in this regard? Is there a patch submission process or anything, where I could write the code and send it your way for review?

Thanks,
Sean