function aObj = domove(aObj, pointX, pointY, refresh)
%EDITLINE/DOMOVE

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.9 $  $Date: 1998/06/11 18:29:27 $

if ~strcmp(get(get(aObj,'Parent'),'Tag'),'ScribeOverlayAxesActive')
   return
end

savedState = get(aObj, 'SavedState');

X = get(aObj,'XData');
Y = get(aObj,'YData');

iPoints = savedState.iPoints;

X(iPoints) = X(iPoints) + (pointX-X(iPoints(1)) - savedState.OffsetX);
Y(iPoints) = Y(iPoints) + (pointY-Y(iPoints(1)) - savedState.OffsetY);

switch get(aObj,'DragConstraint')
case ''
   if nargin==3
      aObj = set(aObj, 'XYData',{X Y});
   else
      aObj = set(aObj, 'XYDataRefresh',{X Y});
   end
case 'fixX'
   aObj = set(aObj,'YData',Y);
case 'fixY'
   aObj = set(aObj,'XData',X);
% otherwise
%    no dragging allowed
end




