Why not override the dragging proxy, it is more useful and flexible.
Below code demonstrate the collapse and expand feature:
$('#pp').portal({
border:false,
fit:true
});
$('div.portal-p').each(function(){
var pp = $(this);
pp.panel('options').onMove = function(){
$(this).panel('expand'); // when moved expand the panel
};
pp.panel('panel').draggable({
onBeforeDrag:function(e){
e.data.startTop = $(this).position().top + $('#pp').scrollTop();
pp.panel('collapse'); // when start moving collapse the panel
}
});
});