PDA

View Full Version : Portlet goes on top of window when dragged



thejoker101
12 Aug 2009, 1:49 PM
I'm seeing an issue where I have portlets as a sort of desktop widget and when I have a window over one and I drag a portlet, it will get a higher Z-index than the window and appear above it until I drag the window. Is this the desired behavior for it? I believe it should maintain whatever Z-Index it had before it was drug.

sven
12 Aug 2009, 1:52 PM
This is configurable in the Draggable class. Moving this to the help forum.

However i changed Draggable to only change the zIndex if usign direct drag. Porlets use a proxy. This will solve it for you.

thejoker101
13 Aug 2009, 4:36 AM
So it will be fixed in a later release? How would I fix it with the Draggable class now? Is there some way to get it from the portlet to set it? Or do I make a new Draggable using the portlet as the argument to the constructor and configure it from there?

sven
13 Aug 2009, 4:41 AM
Draggable d = portlet.getData("gxt.draggable");
d.setUpdateZIndex(false);

thejoker101
14 Aug 2009, 9:46 AM
Draggable d = portlet.getData("gxt.draggable");
d.setUpdateZIndex(false);

Thanks, that seemed to work. Now I notice that when I have the widgets on the desktop (and now that I have a toolbar on there it is even clearer what is happening), whenever the browser window is resized there is an 82px height element added that pushes down what I have on my desktop. The element that seems to be wrapping my widgets gets resized from then on if it's resized again, but on the first resize, no matter if the browser window gets larger or smaller, it will create that element. I thought it may have been the FlowLayout that the LayoutContainer defaulted with, but even using something like FitLayout doesn't make a difference.

thejoker101
14 Aug 2009, 11:47 AM
And nevermind...somehow that cleared itself out...