|
|
@ -1,5 +1,5 @@ |
|
|
|
import { ActionIcon, useMantineColorScheme } from '@mantine/core' |
|
|
|
import { IconApi, IconArrowBackUp, IconArrowsMove, IconCircle, IconExclamationCircle, IconLine, IconPoint, IconPolygon, IconRuler } from '@tabler/icons-react' |
|
|
|
import { IconArrowBackUp, IconArrowsMove, IconCircle, IconExclamationCircle, IconLine, IconPoint, IconPolygon, IconRuler, IconTransformPoint } from '@tabler/icons-react' |
|
|
|
import { setCurrentTool, useMapStore } from '../../../store/map'; |
|
|
|
|
|
|
|
interface IToolbarProps { |
|
|
@ -16,12 +16,6 @@ const MapToolbar = ({ |
|
|
|
|
|
|
|
return ( |
|
|
|
<ActionIcon.Group orientation='vertical' pos='absolute' top='8px' right='8px' style={{ zIndex: 1, backdropFilter: 'blur(8px)', backgroundColor: colorScheme === 'light' ? '#FFFFFFAA' : '#000000AA', borderRadius: '4px' }}> |
|
|
|
<ActionIcon size='lg' variant='transparent' onClick={() => { |
|
|
|
fetch(`${import.meta.env.VITE_API_EMS_URL}/hello`, { method: 'GET' }).then(res => console.log(res)) |
|
|
|
}}> |
|
|
|
<IconApi /> |
|
|
|
</ActionIcon> |
|
|
|
|
|
|
|
<ActionIcon size='lg' variant='transparent' onClick={onSave}> |
|
|
|
<IconExclamationCircle /> |
|
|
|
</ActionIcon> |
|
|
@ -30,6 +24,15 @@ const MapToolbar = ({ |
|
|
|
<IconArrowBackUp /> |
|
|
|
</ActionIcon> |
|
|
|
|
|
|
|
<ActionIcon |
|
|
|
size='lg' |
|
|
|
variant={mapState.currentTool === 'Edit' ? 'filled' : 'transparent'} |
|
|
|
onClick={() => { |
|
|
|
setCurrentTool('Edit') |
|
|
|
}}> |
|
|
|
<IconTransformPoint /> |
|
|
|
</ActionIcon> |
|
|
|
|
|
|
|
<ActionIcon |
|
|
|
size='lg' |
|
|
|
variant={mapState.currentTool === 'Point' ? 'filled' : 'transparent'} |
|
|
|