|
1 | 1 | import { useEffect } from 'react' |
2 | 2 |
|
3 | | -import { useTheme } from '@mui/material' |
| 3 | +import { Box, useTheme } from '@mui/material' |
| 4 | +import { alpha } from '@mui/material/styles' |
4 | 5 | import { |
5 | 6 | Map, |
6 | 7 | MapCameraChangedEvent, |
@@ -74,17 +75,36 @@ const MapContainer = ({ activeData, state, setState }: MapContainerProps) => { |
74 | 75 | ></MapMarker> |
75 | 76 | ) |
76 | 77 | })} |
77 | | - <Legend |
| 78 | + <Box |
78 | 79 | sx={(theme) => ({ |
79 | 80 | position: 'absolute', |
80 | 81 | left: theme.spacing(2), |
81 | 82 | bottom: theme.spacing(4), |
82 | 83 | zIndex: 10, |
| 84 | + display: 'flex', |
| 85 | + flexDirection: 'column', |
| 86 | + alignItems: 'flex-start', |
| 87 | + gap: theme.spacing(1), |
| 88 | + padding: theme.spacing(1), |
| 89 | + borderRadius: theme.spacing(1), |
| 90 | + backgroundColor: alpha(theme.palette.background.active, 0.4), |
| 91 | + boxShadow: '0 8px 24px rgba(0, 0, 0, 0.18)', |
| 92 | + border: `1px solid ${alpha(theme.palette.background.edge, 0.7)}`, |
| 93 | + backdropFilter: 'blur(8px)', |
| 94 | + WebkitBackdropFilter: 'blur(8px)', |
83 | 95 | })} |
84 | | - colorMode={'absolute'} |
85 | | - data={activeData.efpData} |
86 | | - ></Legend> |
87 | | - <GeneDistributionChart data={activeData.efpData} /> |
| 96 | + > |
| 97 | + <GeneDistributionChart |
| 98 | + data={activeData.efpData} |
| 99 | + containerStyle={{ |
| 100 | + position: 'static', |
| 101 | + width: 'auto', |
| 102 | + height: 'auto', |
| 103 | + marginLeft: '-12px', |
| 104 | + }} |
| 105 | + /> |
| 106 | + <Legend colorMode={'absolute'} data={activeData.efpData}></Legend> |
| 107 | + </Box> |
88 | 108 | </Map> |
89 | 109 | ) |
90 | 110 | } |
|
0 commit comments