Created
April 27, 2021 09:18
-
-
Save jakewilliami/40b3611b1241a53e1350677dd281e60b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SM.addState(State.FixationCross, { | |
onEnter: (machine: stateMachine.Machine, blockStruct: BlockStruct) => { | |
gorilla.populate('#gorilla', 'fixation', {}); | |
$('#gorilla') | |
.delay(beforeFixationDelay) | |
.queue(function () { | |
$('.fixation-cross').show(); | |
gorilla.refreshLayout(); | |
$(this).dequeue(); | |
})// end queue for '#gorilla' | |
.delay(fixationLength) | |
.queue(function () { | |
$('.fixation-cross').hide(); | |
gorilla.refreshLayout(); | |
$(this).dequeue(); | |
}) // end queue for '#gorilla' | |
.delay(afterFixationDelay) | |
.queue(function () { | |
// this must be in here, as if I transition outside of the queue, it will not display correctly | |
machine.transition(State.SubTrial, blockStruct); | |
$(this).dequeue(); | |
}); // end queue for '#gorilla' | |
} // end onEnter | |
}) // end addState State.FixationCross |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment