Rebased on top of master

This commit is contained in:
nymkappa 2022-07-23 19:03:12 +02:00
parent 40f2b97075
commit 89f7f99720
No known key found for this signature in database
GPG key ID: E155910B16E8BD04
4 changed files with 17 additions and 12 deletions

View file

@ -1,4 +1,4 @@
<app-nodes-channels-map [widget]=true></app-nodes-channels-map>
<app-nodes-channels-map [style]="'widget'"></app-nodes-channels-map>
<div class="container-xl dashboard-container">

View file

@ -1,4 +1,4 @@
<div [class]="style === 'graph' ? 'full-container ' + style : ''">
<div [class]="'full-container ' + style">
<div *ngIf="style === 'graph'" class="card-header">
<div class="d-flex d-md-block align-items-baseline" style="margin-bottom: -5px">

View file

@ -19,6 +19,15 @@
}
}
.full-container.nodepage {
margin-top: 50px;
}
.full-container.widget {
height: 250px;
min-height: 250px;
}
.widget {
width: 99vw;
height: 250px;
@ -29,10 +38,6 @@
-webkit-mask: linear-gradient(180deg, #11131f00 0%, #11131fff 20%);
}
.full-container.nodepage {
margin-top: 50px;
}
.chart {
min-height: 500px;
width: 100%;

View file

@ -51,7 +51,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
switchMap((params: ParamMap) => {
return zip(
this.assetsService.getWorldMapJson$,
this.apiService.getChannelsGeo$(params.get('public_key')),
this.apiService.getChannelsGeo$(params.get('public_key') ?? undefined),
).pipe(tap((data) => {
registerMap('world', data[0]);
@ -100,16 +100,16 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
postEffect: {
enable: true,
bloom: {
intensity: 0.01,
intensity: this.style === 'nodepage' ? 0.1 : 0.01,
}
},
viewControl: {
center: this.widget ? [2, 0, -10] : undefined,
center: this.style === 'widget' ? [0, 0, -1] : undefined,
minDistance: 0.1,
distance: this.widget ? 20 : 60,
distance: this.style === 'widget' ? 45 : 60,
alpha: 90,
panMouseButton: 'left',
rotateMouseButton: 'none',
rotateMouseButton: undefined,
zoomSensivity: 0.5,
},
itemStyle: {
@ -128,7 +128,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
blendMode: 'lighter',
lineStyle: {
width: 1,
opacity: this.style === 'graph' ? 0.025 : 1,
opacity: ['widget', 'graph'].includes(this.style) ? 0.025 : 1,
},
data: channels
},