Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove layer when click twice
Browse files Browse the repository at this point in the history
anamontiaga committed Sep 4, 2023
1 parent 231b4d2 commit a73b8a4
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -81,9 +81,13 @@ const InventoryPanelCostSurface = ({ noData: noDataMessage }: { noData: string }

const toggleSeeOnMap = useCallback(
(costSurfaceId: CostSurface['id']) => {
dispatch(setVisibleCostSurface(costSurfaceId));
if (costSurfaceId === visibleCostSurface) {
dispatch(setVisibleCostSurface(null));
} else {
dispatch(setVisibleCostSurface(costSurfaceId));
}
},
[dispatch]
[dispatch, visibleCostSurface]
);

const handleSort = useCallback(
5 changes: 1 addition & 4 deletions app/layout/projects/show/map/index.tsx
Original file line number Diff line number Diff line change
@@ -189,13 +189,11 @@ export const ProjectMap = (): JSX.Element => {
],
options: {
layerSettings,
cost: { name: allProjectCostSurfacesQuery.data.name, min: 1, max: 100 },
cost: { name: allProjectCostSurfacesQuery.data?.name, min: 1, max: 100 },
items: selectedPreviewFeatures,
},
});

console.log({ LEGEND });

const SCENARIOS_RUNNED = useMemo(() => {
const status = rawScenariosData
.filter((s) => {
@@ -436,7 +434,6 @@ export const ProjectMap = (): JSX.Element => {
>
{LEGEND.map((i) => {
const { type, items, intersections } = i;
console.log({ i });

return (
<LegendItem

0 comments on commit a73b8a4

Please sign in to comment.