@@ -22,6 +22,13 @@ import { toggleExpanded, setCurrentTabInApp } from '../../../slices/mainSlice';
22
22
import { useDispatch } from 'react-redux' ;
23
23
import { LinkTypesProps , DefaultMargin , ToolTipStyles } from '../../../FrontendTypes' ;
24
24
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
+
25
32
const defaultMargin : DefaultMargin = {
26
33
top : 30 ,
27
34
left : 30 ,
@@ -190,15 +197,17 @@ export default function ComponentMap({
190
197
/>
191
198
192
199
< 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' />
194
203
< rect
204
+ className = 'componentMapContainer'
195
205
onClick = { ( ) => {
196
206
hideTooltip ( ) ;
197
207
} }
198
208
width = { totalWidth }
199
209
height = { totalHeight }
200
210
rx = { 14 }
201
- fill = '#242529'
202
211
/>
203
212
< Group top = { margin . top } left = { margin . left } >
204
213
< Tree
@@ -210,10 +219,11 @@ export default function ComponentMap({
210
219
< Group top = { origin . y } left = { origin . x } >
211
220
{ tree . links ( ) . map ( ( link , i ) => (
212
221
< LinkComponent
222
+ className = 'compMapLink'
213
223
key = { i }
214
224
data = { link }
215
225
percent = { stepPercent }
216
- stroke = '#F00008'
226
+ // stroke={linkStroke}
217
227
strokeWidth = '1'
218
228
fill = 'none'
219
229
/>
@@ -263,9 +273,10 @@ export default function ComponentMap({
263
273
< Group top = { top } left = { left } key = { key } className = 'rect' >
264
274
{ node . depth === 0 && (
265
275
< circle
276
+ className = 'compMapRoot'
266
277
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}
269
280
onClick = { ( ) => {
270
281
dispatch ( toggleExpanded ( node . data ) ) ;
271
282
hideTooltip ( ) ;
@@ -277,16 +288,19 @@ export default function ComponentMap({
277
288
and sets it relative position to other parent nodes of the same level. */ }
278
289
{ node . depth !== 0 && (
279
290
< rect
291
+ className = { node . children ? 'compMapParent' : 'compMapChild' }
280
292
height = { height }
281
293
width = { width }
282
294
y = { - height / 2 }
283
295
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
+ // }
290
304
strokeWidth = { 1.5 }
291
305
strokeOpacity = '1'
292
306
rx = { node . children ? 4 : 10 }
@@ -332,12 +346,19 @@ export default function ComponentMap({
332
346
333
347
{ /* Display text inside of each component node */ }
334
348
< text
349
+ className = {
350
+ node . depth === 0
351
+ ? 'compMapRootText'
352
+ : node . children
353
+ ? 'compMapParentText'
354
+ : 'compMapChildText'
355
+ }
335
356
dy = '.33em'
336
- fontSize = { 10 }
357
+ fontSize = '20px'
337
358
fontFamily = 'Roboto'
338
359
textAnchor = 'middle'
339
360
style = { { pointerEvents : 'none' } }
340
- fill = { node . depth === 0 ? '#161521' : node . children ? 'white' : '#161521' }
361
+ // fill={node.depth === 0 ? '#161521' : node.children ? 'white' : '#161521'}
341
362
>
342
363
{ node . data . name }
343
364
</ text >
0 commit comments