@@ -31,14 +31,15 @@ export default function ComponentMap({
31
31
const [ linkType , setLinkType ] = useState < string > ( 'diagonal' ) ;
32
32
const [ stepPercent , setStepPercent ] = useState < number > ( 0.5 ) ;
33
33
const forceUpdate = useForceUpdate ( ) ;
34
-
34
+ // setting the margins for the Map to render in the tab
35
35
const innerWidth = totalWidth - margin . left - margin . right ;
36
36
const innerHeight = totalHeight - margin . top - margin . bottom ;
37
37
38
38
let origin : { x : number ; y : number } ;
39
39
let sizeWidth : number ;
40
40
let sizeHeight : number ;
41
41
42
+ // rendering for the different tab selections
42
43
if ( layout === 'polar' ) {
43
44
origin = {
44
45
x : innerWidth / 2 ,
@@ -56,7 +57,7 @@ export default function ComponentMap({
56
57
sizeHeight = innerWidth ;
57
58
}
58
59
}
59
-
60
+ // controls for the map
60
61
const LinkComponent = getLinkComponent ( { layout, linkType, orientation } ) ;
61
62
return totalWidth < 10 ? null : (
62
63
< div >
@@ -70,6 +71,7 @@ export default function ComponentMap({
70
71
setLinkType = { setLinkType }
71
72
setStepPercent = { setStepPercent }
72
73
/>
74
+
73
75
< svg width = { totalWidth } height = { totalHeight } >
74
76
< LinearGradient id = 'links-gradient' from = '#fd9b93' to = '#fe6e9e' />
75
77
< rect width = { totalWidth } height = { totalHeight } rx = { 14 } fill = '#242529' />
@@ -94,7 +96,7 @@ export default function ComponentMap({
94
96
95
97
{ tree . descendants ( ) . map ( ( node , key ) => {
96
98
const width = 40 ;
97
- const height = 20 ;
99
+ const height = 15 ;
98
100
99
101
let top : number ;
100
102
let left : number ;
0 commit comments