view listeningTest/multiComp/MmoveW.m @ 8:2afd6ff39f08

prepare2listen fixes
author Brecht De Man <b.deman@qmul.ac.uk>
date Fri, 28 Nov 2014 00:52:12 +0000
parents 4fd284285159
children
line wrap: on
line source
function MmoveW(hf)

dat=get(hf,'userdata');

if dat.drag
   cobj=get(gcf,'currentobject');
   if strcmp(get(cobj,'tag'),'sonicon')
      cpos=get(gcf,'currentpoint');
      posObj=get(cobj,'position');
      dxx=dat.dxx;
      cp=cpos(1);
      if (cp<dxx)
         cp=dxx;
      end	
      if (cp>1-dxx)
         cp=1-dxx;
      end	
      posObj(1)=cp-posObj(3)/2;			
      set(cobj,'position',posObj);
   end	
end