Skip to content
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
3 changes: 1 addition & 2 deletions src/components/DialogToolbarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@
Neuron populations terminating at a location.
</small>
<small v-else>
Neuron populations associated with a location (or)
Neuron populations that share at least one edge with another neuron population.
Neuron populations associated with a location.
</small>
</div>
</div>
Expand Down
33 changes: 31 additions & 2 deletions src/components/SplitFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ import SplitDialog from "./SplitDialog.vue";
// import contextCards from './context-cards'
import { SideBar } from "@abi-software/map-side-bar";
import "@abi-software/map-side-bar/dist/style.css";
import {
queryForwardBackwardConnections
} from '@abi-software/map-utilities';
import {
capitalise,
getNewMapEntry,
Expand All @@ -85,6 +88,7 @@ import { useEntriesStore } from '../stores/entries';
import { useMainStore } from '../stores/index'
import { useSettingsStore } from '../stores/settings';
import { useSplitFlowStore } from '../stores/splitFlow';
import { useConnectivitiesStore } from '../stores/connectivities';
import {
ElContainer as Container,
ElHeader as Header,
Expand Down Expand Up @@ -454,7 +458,7 @@ export default {
});
}
},
openConnectivityInfo: function (payload) {
openConnectivityInfo: async function (payload) {
// expand connectivity card and show connectivity info
// if expanded exist, payload should be an array of one element
// skip payload not match the expanded in multiple views
Expand Down Expand Up @@ -483,6 +487,31 @@ export default {
} else {
// click on the flatmap paths/features directly
// or onDisplaySearch is performed
const connectivityEntries = this.connectivityEntry.map(entry => entry.id);
const flatmapAPI = this.settingsStore.flatmapAPI;
const knowledgeSource = this.connectivityEntry[0].mapuuid || '';

if (connectivityEntries.length && knowledgeSource) {
const connections = await queryForwardBackwardConnections(flatmapAPI, knowledgeSource, connectivityEntries);
const availableConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
const mappedConnections = connections.map((connId) => {
const matched = availableConnectivities.find((ac) => ac.id === connId);
if (matched) {
return {
...matched,
featureId: [matched.id],
title: matched.label,
id: matched.id,
label: matched.label,
'nerve-label': matched['nerve-label'],
ready: true,
};
}
return false;
});
this.connectivityEntry.push(...mappedConnections);
}

this.connectivityKnowledge = this.connectivityEntry;
if (this.connectivityKnowledge.every(ck => ck.ready)) {
this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id);
Expand Down Expand Up @@ -981,7 +1010,7 @@ export default {
});
},
computed: {
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore),
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore, useConnectivitiesStore),
envVars: function () {
return {
API_LOCATION: this.settingsStore.sparcApi,
Expand Down