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

BF: make sure that the OK button of the startup dialog box is active when the experiment has no resources to load

This commit is contained in:
Alain Pitiot 2022-02-16 13:24:36 +01:00
parent 4b2ab80781
commit 5c2b87d950
2 changed files with 5 additions and 1 deletions

View File

@ -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)
)
{

View File

@ -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