function edittree(handle,alpha,dx,dy,xs,ys)
data=get(handle,'Userdata');
list=data.next;
link=data.link;
prev=data.prev;
if length(prev)~=0
lx0=get(prev,'Xdata');
ly0=get(prev,'Ydata');
x=get(handle,'Xdata');
y=get(handle,'Ydata');
x1=(x-xs)*cos(alpha)-(y-ys)*sin(alpha)+xs+dx;
y1=(x-xs)*sin(alpha)+(y-ys)*cos(alpha)+ys+dy;
lx=[lx0 x1];
ly=[ly0 y1];
set(link,'Xdata',lx);
set(link,'Ydata',ly);
set(handle,'Xdata',x1);
set(handle,'Ydata',y1);
if length(list)~=0
  for i=1:length(list)
      handle1=list(i);
      edittree(handle1,alpha,dx,dy,xs,ys);
  end
end