From d4baeb722bf25523c58f725de613960e43cdfa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katharina=20W=C3=BCnsche?= Date: Mon, 9 Dec 2024 15:07:24 +0100 Subject: [PATCH 1/6] feat: add legend to geojson map (#177) --- components/geojson-map-legend.vue | 40 +++++++++++++++++++++++ components/geojson-map-window-content.vue | 5 +++ 2 files changed, 45 insertions(+) create mode 100644 components/geojson-map-legend.vue diff --git a/components/geojson-map-legend.vue b/components/geojson-map-legend.vue new file mode 100644 index 0000000..6a24aa9 --- /dev/null +++ b/components/geojson-map-legend.vue @@ -0,0 +1,40 @@ + + + diff --git a/components/geojson-map-window-content.vue b/components/geojson-map-window-content.vue index f870662..a2aebd0 100644 --- a/components/geojson-map-window-content.vue +++ b/components/geojson-map-window-content.vue @@ -43,6 +43,11 @@ const filteredMarkers = computed(() => { + From 4f97b9e931452d9fe7e1bf67899fde61cc732de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katharina=20W=C3=BCnsche?= Date: Mon, 9 Dec 2024 16:46:29 +0100 Subject: [PATCH 2/6] chore: set color automatically when column visibility changes --- components/data-table/data-table.vue | 6 +++++- components/geojson-map-toolbar.vue | 3 +-- components/geojson-table-window-content.vue | 9 ++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/components/data-table/data-table.vue b/components/data-table/data-table.vue index f7b3db2..022da1b 100644 --- a/components/data-table/data-table.vue +++ b/components/data-table/data-table.vue @@ -83,7 +83,11 @@ const table = useVueTable({ typeof updaterOrValue === "function" ? updaterOrValue(columnVisibility.value) : updaterOrValue; - emit("columnVisibilityChange", table); + emit("columnVisibilityChange", { + table, + //@ts-expect-error missing optional argument for updaterOrValue() + col: typeof updaterOrValue === "function" ? updaterOrValue() : updaterOrValue, + }); }, getCoreRowModel: getCoreRowModel(), getPaginationRowModel: getPaginationRowModel(), diff --git a/components/geojson-map-toolbar.vue b/components/geojson-map-toolbar.vue index 4ae80f4..e4855ad 100644 --- a/components/geojson-map-toolbar.vue +++ b/components/geojson-map-toolbar.vue @@ -32,7 +32,7 @@ const isCollapsibleOpen = ref( ), ); -const { colors, addColor, setColor } = useColorsStore(); +const { colors, setColor } = useColorsStore();