Skip to content

Commit 13c25e3

Browse files
committed
started ax tree tool tip display hover
1 parent 1f25046 commit 13c25e3

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

src/app/components/StateRoute/AxMap/Ax.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ export default function AxTree(props) {
6262
const tooltipStyles: ToolTipStyles = {
6363
...defaultStyles,
6464
minWidth: 60,
65-
maxWidth: 300,
66-
backgroundColor: 'rgb(15,15,15)',
67-
color: 'white',
68-
fontSize: '16px',
65+
maxWidth: 250,
66+
maxHeight: '300px',
6967
lineHeight: '18px',
70-
fontFamily: 'Roboto',
71-
zIndex: 100,
7268
pointerEvents: 'all !important',
69+
margin: 0,
70+
padding: 0,
71+
borderRadius: '8px',
72+
overflowY: 'auto',
73+
overflowX: 'auto',
7374
};
7475

7576
const [orientation, setOrientation] = useState('horizontal');
@@ -402,9 +403,8 @@ export default function AxTree(props) {
402403
}}
403404
>
404405
<div>
405-
<div>
406-
{/*tooltipData['name'].value cannot be referred to using dot notation so using brackets here overrides typescript's strict data typing which was interfering with accessiccing this property */}
407-
<strong>{JSON.stringify(tooltipData['name'].value)}</strong>
406+
<div className='tooltip-header'>
407+
<h3 className='tooltip-title'>{tooltipData['name'].value}</h3>
408408
</div>
409409
<div>
410410
{/* Ax Node Info below names the tooltip title because of how its passed to the ToolTipDataDisplay container*/}

src/app/components/StateRoute/AxMap/AxContainer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,3 @@ const AxContainer = (props: AxContainer) => {
3737
};
3838

3939
export default AxContainer;
40-
41-

src/app/components/StateRoute/AxMap/ToolTipDataDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const ToolTipDataDisplay = ({ containerName, dataObj }) => {
6767
}
6868

6969
return (
70-
<div className='tooltipData' key={`${containerName}-data-container`}>
70+
<div key={`${containerName}-data-container`}>
7171
<JSONTree
7272
data={printableObject} // data to be rendered, a snapshot object
7373
theme={{ extend: colors, tree: () => ({ className: `tooltipData-JSONTree` }) }} // theme set to a base16 theme that has been extended to include "className: 'json-tree'"

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ export default function ComponentMap({
444444
}
445445
}
446446
} else {
447-
aspect = Math.max(aspect, 0.8);
447+
aspect = Math.max(aspect, 1);
448448
}
449449

450450
// mousing controls & Tooltip display logic

0 commit comments

Comments
 (0)