From 5c2b87d95077fa9d8443e5751151418ccfe3d40f Mon Sep 17 00:00:00 2001 From: Alain Pitiot Date: Wed, 16 Feb 2022 13:24:36 +0100 Subject: [PATCH 1/2] BF: make sure that the OK button of the startup dialog box is active when the experiment has no resources to load --- src/core/GUI.js | 2 +- src/core/ServerManager.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/GUI.js b/src/core/GUI.js index 59389cd..cc3bbcf 100644 --- a/src/core/GUI.js +++ b/src/core/GUI.js @@ -532,7 +532,7 @@ export class GUI _updateOkButtonStatus(changeFocus = true) { if ( - this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL + (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL) || (this._allResourcesDownloaded && this._setRequiredKeys && this._setRequiredKeys.size >= this._requiredKeys.length) ) { diff --git a/src/core/ServerManager.js b/src/core/ServerManager.js index ad4c70b..074674c 100644 --- a/src/core/ServerManager.js +++ b/src/core/ServerManager.js @@ -572,6 +572,10 @@ export class ServerManager extends PsychObject // note: we return a Promise that will be resolved when all the resources are downloaded if (resourcesToDownload.size === 0) { + this.emit(ServerManager.Event.RESOURCE, { + message: ServerManager.Event.DOWNLOAD_COMPLETED, + }); + return Promise.resolve(); } else From 08a39b3b45060229a7c2f4bfb6d1159ea866299f Mon Sep 17 00:00:00 2001 From: Alain Pitiot Date: Fri, 18 Feb 2022 11:10:58 +0100 Subject: [PATCH 2/2] version 2022.1.1 --- package.json | 2 +- src/core/PsychoJS.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e982dfa..a4a95b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "psychojs", - "version": "2022.1.0", + "version": "2022.1.1", "private": true, "description": "Helps run in-browser neuroscience, psychology, and psychophysics experiments", "license": "MIT", diff --git a/src/core/PsychoJS.js b/src/core/PsychoJS.js index 45d2974..0acd962 100644 --- a/src/core/PsychoJS.js +++ b/src/core/PsychoJS.js @@ -176,7 +176,7 @@ export class PsychoJS } this.logger.info("[PsychoJS] Initialised."); - this.logger.info("[PsychoJS] @version 2022.1.0"); + this.logger.info("[PsychoJS] @version 2022.1.1"); // hide the initialisation message: jQuery("#root").addClass("is-ready");