Skip to content
Merged
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
52 changes: 29 additions & 23 deletions src/components/FlatmapVuer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2158,40 +2158,46 @@ export default {
});
} else {
// clicking on paths
// do nothing for origin, destination, via
const searchTerms = resources.join();

// for neuron connection mode "all"
if (this.connectionType.toLowerCase() === 'all') {
this.$emit('neuron-connection-feature-click', {
filters: [],
search: searchTerms,
});
} else {
// for neuron connection mode "origin", "via" and "destination"
await this.openConnectivityInfo(data);
}
}
} else {
// load and store knowledge
loadAndStoreKnowledge(this.mapImp, this.flatmapQueries);
let prom1 = []
// Emit placeholders first.
// This may contain invalid connectivity.
this.tooltipEntry = data
.filter(tooltip => tooltip.resource[0] in this.mapImp.pathways.paths)
.map((tooltip) => {
return { title: tooltip.label, featureId: tooltip.resource, ready: false }
})
// this should only for flatmap paths not all features
if (this.tooltipEntry.length) {
this.$emit('connectivity-info-open', this.tooltipEntry);
await this.openConnectivityInfo(data);
}
},
openConnectivityInfo: async function (data) {
// load and store knowledge
loadAndStoreKnowledge(this.mapImp, this.flatmapQueries);
let prom1 = []
// Emit placeholders first.
// This may contain invalid connectivity.
this.tooltipEntry = data
.filter(tooltip => tooltip.resource[0] in this.mapImp.pathways.paths)
.map((tooltip) => {
return { title: tooltip.label, featureId: tooltip.resource, ready: false }
})
// this should only for flatmap paths not all features
if (this.tooltipEntry.length) {
this.$emit('connectivity-info-open', this.tooltipEntry);

// While having placeholders displayed, get details for all paths and then replace.
for (let index = 0; index < data.length; index++) {
prom1.push(await this.getKnowledgeTooltip(data[index]))
}
this.tooltipEntry = await Promise.all(prom1)
const featureIds = this.tooltipEntry.map(tooltip => tooltip.featureId[0])
if (featureIds.length > 0) {
this.displayTooltip(featureIds)
}
// While having placeholders displayed, get details for all paths and then replace.
for (let index = 0; index < data.length; index++) {
prom1.push(await this.getKnowledgeTooltip(data[index]))
}
this.tooltipEntry = await Promise.all(prom1)
const featureIds = this.tooltipEntry.map(tooltip => tooltip.featureId[0])
if (featureIds.length > 0) {
this.displayTooltip(featureIds)
}
}
},
Expand Down