From 0371fa3a6019f06e5860ebd8573f1ccb0e73a9fb Mon Sep 17 00:00:00 2001 From: "David J. Yu" <87633683+ddjnw1yu@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:44:11 +1200 Subject: [PATCH 1/2] Bring back FC map markers --- src/components/viewers/Flatmap.vue | 4 +--- src/mixins/DynamicMarkerMixin.js | 10 +++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/viewers/Flatmap.vue b/src/components/viewers/Flatmap.vue index f7d534dc..4a81e3a6 100644 --- a/src/components/viewers/Flatmap.vue +++ b/src/components/viewers/Flatmap.vue @@ -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) { diff --git a/src/mixins/DynamicMarkerMixin.js b/src/mixins/DynamicMarkerMixin.js index 59704c8f..a0ddd166 100644 --- a/src/mixins/DynamicMarkerMixin.js +++ b/src/mixins/DynamicMarkerMixin.js @@ -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") { From fa52932d0702421ba4ba1df40c78debcec9d476e Mon Sep 17 00:00:00 2001 From: "David J. Yu" <87633683+ddjnw1yu@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:10:03 +1200 Subject: [PATCH 2/2] Add semi colon --- src/mixins/DynamicMarkerMixin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mixins/DynamicMarkerMixin.js b/src/mixins/DynamicMarkerMixin.js index a0ddd166..0cde5454 100644 --- a/src/mixins/DynamicMarkerMixin.js +++ b/src/mixins/DynamicMarkerMixin.js @@ -48,11 +48,11 @@ export default { flatmapImp.clearMarkers(); flatmapImp.clearDatasetMarkers(); if (this.entry.resource === "FunctionalConnectivity") { - let FCMapMarkers = [] + let FCMapMarkers = []; for (let i = 0; i < fmMarkers.length; i++) { - FCMapMarkers = FCMapMarkers.concat(fmMarkers[i].terms) + FCMapMarkers = FCMapMarkers.concat(fmMarkers[i].terms); } - flatmapImp.addMarkers(Array.from(new Set(FCMapMarkers)), { className: "standard-marker", cluster: false }) + flatmapImp.addMarkers(Array.from(new Set(FCMapMarkers)), { className: "standard-marker", cluster: false }); } else { flatmapImp.addDatasetMarkers(fmMarkers); }