mkaring/nifty-gui — comment on commit c52bc293c465567968b208e22b19aeeb19ae1d13
File:  line 0
By mkaring:

Okay I looked further into this problem and we really got ourselves a problem here. The way the droppable controls are supposed to operate is sadly not documented at all.

The facts are:
Each droppable control has a #droppableContent - Panel that is marked as childRootId and receives initial all elements that are dropped on the droppable.
The #droppableContent has a center child layout. So it can hold only one object, that suggests that only one object can be dropped on a field.
When updating the layout the droppable control takes all draggables out of its #droppableContent and places them as child element of the control directly. The control itself is absolute aligned so as many objects as wanted can stay inside there. How ever due the different child layout elements "jump" when ever the layouting gets a run after something was dropped.

The fix I proposed simply leaves the droppable elements inside the #droppableContent. That works fine as long as the droppable is the only element inside the draggable. As soon as there are multiple objects dropped inside the droppable bad things start happening.

With the way it works currently the demo works but thats pretty much it. There is no chance at all to change the way the dropped object is located inside the droppable. And in case the dropped objects have different sizes and need to be in the center of the drop area this is a very problematic issue.

The easiest way to solve this issue is to allow to change the child layout and to offer a additional layout manager that does essential the same thing as the centered layout manager but layouts more then one element.