feat(vector-map): add drawer to control individual layers + add support for text layer
3 unresolved threads
Closes MIN-47
Merge request reports
Activity
Filter activity
requested review from @KonradAt
- src/redux/layers/layers.thunks.ts 0 → 100644
19 if (!isDataValid) { 20 return undefined; 21 } 22 const layers = await Promise.all( 23 data.content.map(async layer => { 24 const [textsResponse] = await Promise.all([ 25 axiosInstanceNewAPI.get(apiPath.getLayerTexts(modelId, layer.id)), 26 ]); 27 28 return { 29 layer, 30 texts: textsResponse.data.content, 31 }; 32 }), 33 ); 34 layers.filter(layer => layerTextSchema.safeParse(layer.texts).success); Fixed in PR: !266 (merged)
changed this line in version 5 of the diff
- src/redux/layers/layers.types.ts 0 → 100644
1 import { FetchDataState } from '@/types/fetchDataState'; 2 import { Layer, LayerText } from '@/types/models'; 3 4 export type LayerState = { 5 layer: Layer; Fixed in PR: !266 (merged)
changed this line in version 5 of the diff
5 import { Switch } from '@/shared/Switch'; 6 import { setLayerVisibility } from '@/redux/layers/layers.slice'; 7 8 export const LayersDrawer = (): JSX.Element => { 9 const layers = useAppSelector(layersSelector); 10 const dispatch = useAppDispatch(); 11 12 return ( 13 <div data-testid="layers-drawer" className="h-full max-h-full"> 14 <DrawerHeading title="Layers" /> 15 <div className="flex h-[calc(100%-93px)] max-h-[calc(100%-93px)] flex-col overflow-y-auto px-6"> 16 {layers.map(layer => ( 17 <div key={layer.layer.id} className="flex items-center justify-between border-b p-4"> 18 <h1>{layer.layer.name}</h1> 19 <Switch 20 isChecked={layer.layer.visible} Fixed in PR: !266 (merged)
changed this line in version 5 of the diff
added 11 commits
-
081e2d0f...a82ccd07 - 10 commits from branch
feat/MIN-48-active-option
- d7caeb0f - chore: resolve merge conflicts
-
081e2d0f...a82ccd07 - 10 commits from branch
added 8 commits
-
dda8d37a...2bb988c0 - 7 commits from branch
feat/MIN-35-hypothetical-option
- ad3f51f6 - chore: resolve merge conflicts
-
dda8d37a...2bb988c0 - 7 commits from branch
mentioned in commit 8f6b3e78
Please register or sign in to reply