Skip to content
Snippets Groups Projects

feat(vector-map): add drawer to control individual layers + add support for text layer

3 unresolved threads

Closes MIN-47

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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);
  • 1 import { FetchDataState } from '@/types/fetchDataState';
    2 import { Layer, LayerText } from '@/types/models';
    3
    4 export type LayerState = {
    5 layer: Layer;
  • 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}
  • added 2 commits

    • bf35b705 - 1 commit from branch feat/MIN-48-active-option
    • 081e2d0f - Merge branch 'feat/MIN-48-active-option' of...

    Compare with previous version

  • added 11 commits

    Compare with previous version

  • Konrad Przybysz approved this merge request

    approved this merge request

  • Miłosz Grocholewski deleted the feat/MIN-48-active-option branch. This merge request now targets the feat/MIN-36-homomultimer-option branch

    deleted the feat/MIN-48-active-option branch. This merge request now targets the feat/MIN-36-homomultimer-option branch

  • added 2 commits

    • 9d0869a0 - feat(vector-map): implement square layer
    • dda8d37a - Merge branch 'feat/MIN-44-square-layer' into 'feat/MIN-47-visibility-of-layers'

    Compare with previous version

  • Miłosz Grocholewski deleted the feat/MIN-36-homomultimer-option branch. This merge request now targets the feat/MIN-35-hypothetical-option branch

    deleted the feat/MIN-36-homomultimer-option branch. This merge request now targets the feat/MIN-35-hypothetical-option branch

  • added 8 commits

    Compare with previous version

  • added 2 commits

    • b6cea86f - feat(vector-map): implement lines layer
    • fe8d077b - Merge branch 'feat/MIN-45-line-layer' into 'feat/MIN-47-visibility-of-layers'

    Compare with previous version

  • mentioned in commit 8f6b3e78

  • Please register or sign in to reply
    Loading