Mercurial > hg > ape
view listeningTest/multiComp/MmoveW.m @ 15:24be5e9ce25b tip
Update README
author | Brecht De Man <brecht.deman@bcu.ac.uk> |
---|---|
date | Thu, 20 Sep 2018 12:23:20 +0200 |
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