|
34 | 34 |
|
35 | 35 | thisEvent.fixationPosition = cfg.design.blockFixationPosition{iBlock}; |
36 | 36 |
|
| 37 | + % This is necessary because where the dot aperture is drawn is set in cfg |
| 38 | + % So we "reset" that pixel value from the value in degrees |
| 39 | + cfg.aperture.xPos = cfg.design.xDisplacementAperture; |
| 40 | + cfg.aperture = degToPix('xPos', cfg.aperture, cfg); |
| 41 | + |
37 | 42 | switch thisEvent.fixationPosition |
38 | 43 |
|
39 | 44 | case 'fixation_right' |
40 | 45 | cfg.aperture.xPosPix = -abs(cfg.aperture.xPosPix); |
41 | | - |
42 | | - thisEvent.dotCenterXPosPix = cfg.aperture.xPosPix; |
43 | | - |
44 | 46 | thisFixation.fixation.xDisplacement = cfg.design.xDisplacementFixation; |
45 | | - thisFixation = initFixation(thisFixation); |
46 | 47 |
|
47 | 48 | case 'fixation_left' |
48 | 49 | cfg.aperture.xPosPix = +abs(cfg.aperture.xPosPix); |
| 50 | + thisFixation.fixation.xDisplacement = -cfg.design.xDisplacementFixation; |
49 | 51 |
|
50 | | - thisEvent.dotCenterXPosPix = cfg.aperture.xPosPix; |
| 52 | + otherwise |
51 | 53 |
|
52 | | - thisFixation.fixation.xDisplacement = -cfg.design.xDisplacementFixation; |
53 | | - thisFixation = initFixation(thisFixation); |
| 54 | + error('WTF'); |
| 55 | + |
| 56 | + end |
54 | 57 |
|
| 58 | + if isfield(cfg.fixation, 'xDisplacementPix') |
| 59 | + cfg.aperture.xPosPix = cfg.aperture.xPosPix + cfg.fixation.xDisplacementPix; |
| 60 | + thisFixation.fixation.xDisplacement = thisFixation.fixation.xDisplacement + ... |
| 61 | + cfg.fixation.xDisplacement; |
55 | 62 | end |
56 | 63 |
|
| 64 | + if isfield(cfg.fixation, 'yDisplacementPix') |
| 65 | + cfg.aperture.yPosPix = cfg.fixation.yDisplacementPix; |
| 66 | + thisEvent.dotCenterYPosPix = cfg.aperture.yPosPix; |
| 67 | + end |
| 68 | + |
| 69 | + thisEvent.dotCenterXPosPix = cfg.aperture.xPosPix; |
| 70 | + |
| 71 | + if isfield(cfg.fixation, 'yDisplacementPix') |
| 72 | + end |
| 73 | + |
| 74 | + thisFixation.fixation.allCoords; |
| 75 | + |
| 76 | + thisFixation = initFixation(thisFixation); |
| 77 | + |
57 | 78 | end |
58 | 79 |
|
59 | 80 | varargout = {thisEvent, thisFixation, cfg}; |
|
0 commit comments