Bug fix...

This commit is contained in:
Eric van der Vlist 2022-12-30 21:12:46 +01:00
parent 73aad8f2a2
commit 67cfd16efb
1 changed files with 1 additions and 27 deletions

View File

@ -28,6 +28,7 @@ const level2Key = (feature: Feature) =>
feature.get('context').trkId;
export const clickHandler = (event: any) => {
hierarchy = {};
const pixel = [event.originalEvent.x, event.originalEvent.y];
const features = event.map.getFeaturesAtPixel(pixel, { hitTolerance: 30 });
selectedFeatures.map((feature) => feature.set('isSelected', false));
@ -158,33 +159,6 @@ const Infos: Component<{}> = (props) => {
sx={{ width: 'calc(100% - 5px)' }}
>
<FeaturesTree featuresHierarchy={hierarchy} />
{/* <For each={selectedFeatures}>
{(feature) => {
const geometry = feature.getGeometry();
const length = geometry
? getLength(geometry, { projection: 'EPSG:4326' })
: undefined;
return (
<Item sx={{ width: 'calc(100% - 1px)' }}>
<Grid container spacing={2} alignItems='center'>
<Grid item xs={11}>
{feature.get('getTitle')
? feature.get('getTitle')()
: t(feature.get('type'))}
{length ? formatLength(length) : ''}
</Grid>
<Grid item xs={1} sx={{ paddingLeft: '0px' }}>
<Show when={feature.get('edit')}>
<IconButton onClick={feature.get('edit')}>
<EditIcon />
</IconButton>
</Show>
</Grid>
</Grid>
</Item>
);
}}
</For> */}
</Stack>
</Dialog>
);