Mercurial > hg > ape
annotate 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 |
rev | line source |
---|---|
b@0 | 1 function MmoveW(hf) |
b@0 | 2 |
b@0 | 3 dat=get(hf,'userdata'); |
b@0 | 4 |
b@0 | 5 if dat.drag |
b@0 | 6 cobj=get(gcf,'currentobject'); |
b@0 | 7 if strcmp(get(cobj,'tag'),'sonicon') |
b@0 | 8 cpos=get(gcf,'currentpoint'); |
b@0 | 9 posObj=get(cobj,'position'); |
b@0 | 10 dxx=dat.dxx; |
b@0 | 11 cp=cpos(1); |
b@0 | 12 if (cp<dxx) |
b@0 | 13 cp=dxx; |
b@0 | 14 end |
b@0 | 15 if (cp>1-dxx) |
b@0 | 16 cp=1-dxx; |
b@0 | 17 end |
b@0 | 18 posObj(1)=cp-posObj(3)/2; |
b@0 | 19 set(cobj,'position',posObj); |
b@0 | 20 end |
b@0 | 21 end |