Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scoring/rdwatch database switch update region list and mapping #455

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions vue/src/views/AnnotationViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import AddProposal from "../components/annotationViewer/AddProposal.vue"
import AddRegion from "../components/AddRegion.vue"
import MapLegend from "../components/MapLegend.vue";
import { Ref, computed, onMounted, ref, watch } from "vue";
import { state } from "../store";
import { state, updateRegionList, updateRegionMap } from "../store";
import { ApiService } from "../client";

interface Props {
region?: string;
Expand Down Expand Up @@ -40,7 +41,19 @@ onMounted(() => {

watch(selectedModelRun, () => {
state.selectedImageSite = undefined
})
});

watch(()=> ApiService.getApiPrefix(), async () => {
await updateRegionList();
await updateRegionMap();
if (props.region) {
state.filters = {
...state.filters,
regions: [props.region],
};
}
});


const updateSiteList = async () => {
if (siteList.value !== null) {
Expand Down
14 changes: 13 additions & 1 deletion vue/src/views/RGD.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import LayerSelection from "../components/LayerSelection.vue";
import ImageViewer from "../components/imageViewer/ImageViewer.vue";
import SiteList from "../components/siteList/SiteList.vue";
import MapLegend from "../components/MapLegend.vue";
import { onMounted } from "vue";
import { onMounted, watch } from "vue";
import { state, updateRegionList, updateRegionMap } from "../store";
import AddRegion from "../components/AddRegion.vue";
import { ApiService } from "../client";
interface Props {
region?: string;
selected?: number[] | string;
Expand All @@ -27,6 +28,17 @@ onMounted(async () => {
};
}
});

watch(()=> ApiService.getApiPrefix(), async () => {
await updateRegionList();
await updateRegionMap();
if (props.region) {
state.filters = {
...state.filters,
regions: [props.region],
};
}
});
</script>

<template>
Expand Down
Loading