void256 - 2012-03-06

3497744: Draggable freezes if dragged outside scroll panel

This was a problem related to the childClip property of an element. Any
element that is a child of an element with childClip set to true (so
that this element is being clipped to it's parents area) will take the
parent area into account when being checked for mouse events. So that
mouse events that are inside of the element but outside of the parent
clipping region will not be reported as "hits" for the element.

This is the correct behaviour. Unfortunatly the parentClipArea was not
reset when a drag operation started. So we end up with a draggable that
can be dragged but when being dropped will keep the parentClipArea of
it's original parent :) The result is that mouse events (as the mouse
button release event in case of the dragStop() operation) will never be
reported to the draggable - because the events occur outside of the
parentClipArea =D

This is now fixed: If elements change its parent element using
setParent() or with nifty.moveElement() the parentClipArea attribute of
the new parent are used for the element. So when you drag an element
from within an element with parentClipArea enabled the parentClipArea of
the dragged element will be disabled (because the new temporary parent
of the element, the popup, does not have parentClipArea set). This way
the dragStop() event is being called correctly and this problem is
fixed.

On the other hand if you drop the draggable on a droppable with
childClip set the parentClipArea of the new parent will be used for the
draggable as well. So this is actually two fixes in one ;)