use the invaders game as 'loading screen'

This commit is contained in:
2019-12-26 18:48:33 +01:00
parent 9b263a70c8
commit 2268ab40b3
7 changed files with 14 additions and 7 deletions

View File

@@ -107,16 +107,19 @@ export class VisualizationPageComponent implements OnInit {
that.plotView.imageUrl = '';
that.galleryView.show=false;
document.dispatchEvent(new Event("invadersStart", {}));
const request = this.createPlotRequest();
this.plotService.sendPlotRequest(request).subscribe(function(plotResponse){
console.log("response: " + JSON.stringify(plotResponse));
that.plotView.imageUrl = "http://"+window.location.hostname+':8080/'+plotResponse.imageUrl;
document.dispatchEvent(new Event("invadersPause", {}));
},
error => {
that.plotView.imageUrl = '';
that.showError(error.error.message);
document.dispatchEvent(new Event("invadersPause", {}));
});
}