Skip to content

Commit

Permalink
Merge pull request #240 from ddjnw1yu/fc-map-markers
Browse files Browse the repository at this point in the history
Bring back FC map markers
  • Loading branch information
alan-wu authored Aug 14, 2024
2 parents f36d430 + fa52932 commit a3ca6ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/viewers/Flatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ export default {
let provClone = {id: this.entry.id, prov: this.getFlatmapImp().provenance}; //create clone of provenance and add id
EventBus.emit("mapImpProv", provClone); // send clone to context card
this.$emit("flatmap-provenance-ready", provClone);
if (this.entry.resource !== "FunctionalConnectivity"){
this.flatmapReadyForMarkerUpdates(flatmap);
}
this.flatmapReadyForMarkerUpdates(flatmap);
EventBus.emit("mapLoaded", flatmap);
},
onPathwaySelectionChanged: function (data) {
Expand Down
10 changes: 9 additions & 1 deletion src/mixins/DynamicMarkerMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ export default {
let fmMarkers = this.removeMarkersNotOnFlatmap(flatmapImp, markers);
flatmapImp.clearMarkers();
flatmapImp.clearDatasetMarkers();
flatmapImp.addDatasetMarkers(fmMarkers);
if (this.entry.resource === "FunctionalConnectivity") {
let FCMapMarkers = [];
for (let i = 0; i < fmMarkers.length; i++) {
FCMapMarkers = FCMapMarkers.concat(fmMarkers[i].terms);
}
flatmapImp.addMarkers(Array.from(new Set(FCMapMarkers)), { className: "standard-marker", cluster: false });
} else {
flatmapImp.addDatasetMarkers(fmMarkers);
}

// Set the featured markers
if (this.entry.type === "MultiFlatmap") {
Expand Down

0 comments on commit a3ca6ea

Please sign in to comment.