Skip to content

Commit 634e36b

Browse files
authored
Merge pull request #196 from kaleido-io/nw-map
update network map to better fit large networks
2 parents 659bfb2 + b23a920 commit 634e36b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/components/NetworkMap/NetworkMap.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ interface Props {
3939
const NODE_STRING_DELIM = '||';
4040
const SIZE_MAP = {
4141
small: {
42-
node: 40,
43-
org: 75,
44-
distance: 100,
42+
node: 24,
43+
org: 36,
44+
distance: 60,
4545
},
4646
medium: {
4747
node: 90,
@@ -223,6 +223,9 @@ export const NetworkMap: React.FC<Props> = ({ size }) => {
223223
case 5:
224224
return size === 'small' ? 17 : 60;
225225
default:
226+
if (numOrgs > 10) {
227+
return 3.2;
228+
}
226229
return 50;
227230
}
228231
};

src/pages/Network/views/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const NetworkMapDashboard: () => JSX.Element = () => {
3939
noDateFilter
4040
></Header>
4141
<FFPageLayout height="85vh">
42-
{isMounted && <NetworkMap size="large" />}
42+
{isMounted && <NetworkMap size="small" />}
4343
</FFPageLayout>
4444
</>
4545
);

0 commit comments

Comments
 (0)