@@ -21,19 +21,15 @@ import ToolTipDataDisplay from './ToolTipDataDisplay';
21
21
import { toggleExpanded , setCurrentTabInApp } from '../../../slices/mainSlice' ;
22
22
import { useDispatch } from 'react-redux' ;
23
23
import { LinkTypesProps , DefaultMargin , ToolTipStyles } from '../../../FrontendTypes' ;
24
- import { store } from '../../../store' ;
25
24
26
25
const linkStroke = '#F00008' ; //#F00008 original
27
26
const rootStroke = '#F00008' ; //#F00008 original
28
27
const nodeParentFill = '#161521' ; //#161521 original
29
28
const nodeChildFill = '#62d6fb' ; //#62d6fb original
30
29
const nodeParentStroke = '#F00008' ; //#F00008 original
31
30
const nodeChildStroke = '#4D4D4D' ; //#4D4D4D original
32
- const hoverClass = '#ab269b' ; //pinkish
33
-
34
31
let stroke = '' ;
35
32
36
-
37
33
/* Heat Map Colors (for links) */
38
34
const lightOrange = '#F1B476' ;
39
35
const darkOrange = '#E4765B' ;
@@ -239,11 +235,9 @@ export default function ComponentMap({
239
235
{ ( tree ) => (
240
236
< Group top = { origin . y + 35 } left = { origin . x + 50 / aspect } >
241
237
{ tree . links ( ) . map ( ( link , i ) => {
242
-
243
238
const linkName = link . source . data . name ;
244
239
const propsObj = link . source . data . componentData . props ;
245
240
const childPropsObj = link . target . data . componentData . props ;
246
- //consolelog const above
247
241
let propsLength ;
248
242
let childPropsLength ;
249
243
@@ -256,7 +250,7 @@ export default function ComponentMap({
256
250
}
257
251
// go to https://en.wikipedia.org/wiki/Logistic_function
258
252
// for an explanation of Logistic functions and parameters used
259
- const y0 = - 3 ;
253
+ const yshift = - 3 ;
260
254
const x0 = 5 ;
261
255
const L = 25 ;
262
256
const k = .4 ;
@@ -274,46 +268,19 @@ export default function ComponentMap({
274
268
} else {
275
269
stroke = plum ;
276
270
}
271
+ // stroke = '#df6f37'
277
272
}
278
-
279
-
280
- const [ isHovered , setIsHovered ] = useState ( false ) ;
281
- const handleMouseEnter = ( ) => {
282
- setIsHovered ( true ) ;
283
- } ;
284
- const handleMouseLeave = ( ) => {
285
- setIsHovered ( false )
286
- }
287
-
288
- let strokeColor ; //isHovered ? hoverClass : stroke;
289
- let chooseCursor ;
290
-
291
- if ( isHovered ) {
292
- strokeColor = hoverClass ;
293
- }
294
- else {
295
- strokeColor = stroke
296
- }
297
-
298
273
299
274
return (
300
- < >
301
- < LinkComponent
302
- className = 'compMapLink'
303
- key = { i }
304
- data = { link }
305
- percent = { stepPercent }
306
- stroke = { strokeColor } // changing this color on hover
307
- strokeWidth = { strokeWidthIndex } /* strokeWidth */ // width of the link
308
- fill = 'none'
309
- //testing hover functionality
310
- onMouseEnter = { handleMouseEnter }
311
- onMouseLeave = { handleMouseLeave }
312
- />
313
- < div className = "linkHoverInfo" >
314
- < h1 > Props</ h1 >
315
- </ div >
316
- </ >
275
+ < LinkComponent
276
+ className = 'compMapLink'
277
+ key = { i }
278
+ data = { link }
279
+ percent = { stepPercent }
280
+ stroke = { stroke } // color of the link --not used--
281
+ strokeWidth = { strokeWidthIndex } /* strokeWidth */ // width of the link
282
+ fill = 'none'
283
+ />
317
284
)
318
285
} )
319
286
}
@@ -527,7 +494,7 @@ export default function ComponentMap({
527
494
</ Tree >
528
495
</ Group >
529
496
</ svg >
530
- { tooltipOpen && tooltipData && ( // if the tooltip is open and there is data to display...
497
+ { tooltipOpen && tooltipData && (
531
498
< TooltipInPortal
532
499
// set this to random so it correctly updates with parent bounds
533
500
key = { Math . random ( ) }
@@ -570,11 +537,6 @@ export default function ComponentMap({
570
537
</ div >
571
538
</ TooltipInPortal >
572
539
) }
573
- < div className = "linkHover-Info" >
574
- < p > < strong > Props </ strong > ():</ p >
575
- < div > </ div >
576
- </ div >
577
-
578
540
</ div >
579
541
) ;
580
542
}
0 commit comments