@@ -22,6 +22,13 @@ import { toggleExpanded, setCurrentTabInApp } from '../../../slices/mainSlice';
2222import { useDispatch } from 'react-redux' ;
2323import { LinkTypesProps , DefaultMargin , ToolTipStyles } from '../../../FrontendTypes' ;
2424
25+ const linkStroke = '#F00008' ; //#F00008 original
26+ const rootStroke = '#F00008' ; //#F00008 original
27+ const nodeParentFill = '#161521' ; //#161521 original
28+ const nodeChildFill = '#62d6fb' ; //#62d6fb original
29+ const nodeParentStroke = '#F00008' ; //#F00008 original
30+ const nodeChildStroke = '#4D4D4D' ; //#4D4D4D original
31+
2532const defaultMargin : DefaultMargin = {
2633 top : 30 ,
2734 left : 30 ,
@@ -190,15 +197,17 @@ export default function ComponentMap({
190197 />
191198
192199 < svg ref = { containerRef } width = { totalWidth } height = { totalHeight } >
193- < LinearGradient id = 'links-gradient' from = '#e75e62' to = '#f00008' />
200+ { /* <LinearGradient id='root-gradient' from='#e75e62' to='#f00008' /> */ }
201+ < LinearGradient id = 'root-gradient' from = '#488689' to = '#3c6e71' />
202+ < LinearGradient id = 'parent-gradient' from = '#488689' to = '#3c6e71' />
194203 < rect
204+ className = 'componentMapContainer'
195205 onClick = { ( ) => {
196206 hideTooltip ( ) ;
197207 } }
198208 width = { totalWidth }
199209 height = { totalHeight }
200210 rx = { 14 }
201- fill = '#242529'
202211 />
203212 < Group top = { margin . top } left = { margin . left } >
204213 < Tree
@@ -210,10 +219,11 @@ export default function ComponentMap({
210219 < Group top = { origin . y } left = { origin . x } >
211220 { tree . links ( ) . map ( ( link , i ) => (
212221 < LinkComponent
222+ className = 'compMapLink'
213223 key = { i }
214224 data = { link }
215225 percent = { stepPercent }
216- stroke = '#F00008'
226+ // stroke={linkStroke}
217227 strokeWidth = '1'
218228 fill = 'none'
219229 />
@@ -263,9 +273,10 @@ export default function ComponentMap({
263273 < Group top = { top } left = { left } key = { key } className = 'rect' >
264274 { node . depth === 0 && (
265275 < circle
276+ className = 'compMapRoot'
266277 r = { 25 } // increase from 12 to 25 to improve visibility
267- fill = "url('#links -gradient')"
268- stroke = '#F00008' // changing to red #F00008 to increase readability with sharper contrast
278+ fill = "url('#root -gradient')"
279+ //stroke={rootStroke}
269280 onClick = { ( ) => {
270281 dispatch ( toggleExpanded ( node . data ) ) ;
271282 hideTooltip ( ) ;
@@ -277,16 +288,19 @@ export default function ComponentMap({
277288 and sets it relative position to other parent nodes of the same level. */ }
278289 { node . depth !== 0 && (
279290 < rect
291+ className = { node . children ? 'compMapParent' : 'compMapChild' }
280292 height = { height }
281293 width = { width }
282294 y = { - height / 2 }
283295 x = { - width / 2 }
284- fill = { node . children ? '#161521' : '#62d6fb' }
285- stroke = {
286- node . data . isExpanded && node . data . children . length > 0
287- ? '#F00008'
288- : '#4D4D4D'
289- }
296+ fill = "url('#parent-gradient')"
297+ //color={'#ff0000'}
298+ //fill={node.children ? nodeParentFill : nodeChildFill}
299+ //stroke={
300+ // node.data.isExpanded && node.data.children.length > 0
301+ // ? nodeParentStroke
302+ // : nodeChildStroke
303+ // }
290304 strokeWidth = { 1.5 }
291305 strokeOpacity = '1'
292306 rx = { node . children ? 4 : 10 }
@@ -332,12 +346,19 @@ export default function ComponentMap({
332346
333347 { /* Display text inside of each component node */ }
334348 < text
349+ className = {
350+ node . depth === 0
351+ ? 'compMapRootText'
352+ : node . children
353+ ? 'compMapParentText'
354+ : 'compMapChildText'
355+ }
335356 dy = '.33em'
336- fontSize = { 10 }
357+ fontSize = '20px'
337358 fontFamily = 'Roboto'
338359 textAnchor = 'middle'
339360 style = { { pointerEvents : 'none' } }
340- fill = { node . depth === 0 ? '#161521' : node . children ? 'white' : '#161521' }
361+ // fill={node.depth === 0 ? '#161521' : node.children ? 'white' : '#161521'}
341362 >
342363 { node . data . name }
343364 </ text >
0 commit comments