function figObj = enddrag(figObj)
%FIGOBJ/ENDDRAG

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.7 $  $Date: 2000/06/15 22:42:53 $

dragBin = figObj.DragObjects;
for aObjH = fliplr(dragBin.Items);
   enddrag(aObjH);
end

% restore 
HG = get(figObj,'MyHGHandle');
set(HG,'pointer','arrow',...
        'WindowButtonMotionFcn','',...
        'WindowButtonUpFcn',''...
        );
if isappdata(HG,'ScribeSaveFigUnits')
   oldUnits = getappdata(HG,'ScribeSaveFigUnits');
   if ~isempty(oldUnits)
      set(HG,'Units',oldUnits);
   end
   rmappdata(HG,'ScribeSaveFigUnits');
end