1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

Merge branch 'psychopy:2021.3.0' into 2021.3.0

This commit is contained in:
Alain Pitiot 2021-09-30 08:23:58 +02:00 committed by GitHub
commit 2d6f994180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,6 +88,28 @@ export class QuestHandler extends TrialHandler
this._estimateQuestValue();
}
/**
* Setter for the method attribute.
*
* @param {mixed} method - the method value, PsychoPy-style values ("mean", "median",
* "quantile") are converted to their respective QuestHandler.Method values
* @param {boolean} log - whether or not to log the change of seed
*/
setMethod(method, log)
{
let methodMapping = {
"quantile": QuestHandler.Method.QUANTILE,
"mean": QuestHandler.Method.MEAN,
"mode": QuestHandler.Method.MODE
};
// If method is a key in methodMapping, convert method to corresponding value
if (methodMapping.hasOwnProperty(method))
{
method = methodMapping[method];
}
this._setAttribute("method", method, log);
}
/**
* Add a response and update the PDF.
*