Restoring Preview component behavior

This commit is contained in:
softsimon 2023-03-22 13:20:22 +09:00
parent bf5821c8c8
commit 77835bcb9d
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -204,19 +204,33 @@ export class NodesChannelsMap implements OnInit {
prepareChartOptions(nodes, channels) { prepareChartOptions(nodes, channels) {
let title: object; let title: object;
if (channels.length === 0 && !this.placeholder) { if (channels.length === 0) {
this.isLoading = false; if (!this.placeholder) {
title = { this.isLoading = false;
textStyle: { title = {
color: 'white', textStyle: {
fontSize: 18 color: 'white',
}, fontSize: 18
text: $localize`No data to display yet. Try again later.`, },
left: 'center', text: $localize`No data to display yet. Try again later.`,
top: 'center' left: 'center',
}; top: 'center'
this.zoom = 1.5; };
this.center = [0, 20]; this.zoom = 1.5;
this.center = [0, 20];
} else { // used for Node and Channel preview components
title = {
textStyle: {
color: 'white',
fontSize: 18
},
text: $localize`No geolocation data available`,
left: 'center',
top: 'center'
};
this.zoom = 1.5;
this.center = [0, 20];
}
} }
this.chartOptions = { this.chartOptions = {