Skip to content

Commit

Permalink
Merge pull request #265 from alan-wu/remove-hardcoded
Browse files Browse the repository at this point in the history
Remove hardcoded information.
  • Loading branch information
alan-wu authored Jan 7, 2025
2 parents ec83053 + bd496d9 commit 47082cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 276 deletions.
256 changes: 0 additions & 256 deletions src/components/markerZoomLevelsHardCoded.js

This file was deleted.

19 changes: 3 additions & 16 deletions src/mixins/ContentMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
getParentsRegion,
} from "../components/SimulatedData.js";
import EventBus from "../components/EventBus";
import markerZoomLevels from "../components/markerZoomLevelsHardCoded.js";
import { mapStores } from 'pinia';
import { useSettingsStore } from '../stores/settings';
import { useSplitFlowStore } from '../stores/splitFlow';
Expand Down Expand Up @@ -126,16 +125,13 @@ export default {
eventType: undefined,
};


if (type == "MultiFlatmap" || type == "Flatmap") {
result.internalName = this.idNamePair[resource.feature.models];
result.internalName = resource?.feature?.label ? resource.feature.label : this.idNamePair[resource.feature.models];
if (resource.eventType == "click") {
result.eventType = "selected";
if (resource.feature.type == "marker") {
let label = this.idNamePair[resource.feature.models];
let hardcodedAnnotation = markerZoomLevels.filter(
mz => mz.id === resource.feature.models
);

let label = result.internalName;
if (
this.settingsStore.isFeaturedMarkerIdentifier(
resource.feature.id
Expand All @@ -149,15 +145,6 @@ export default {
),
featuredDataset: true,
};
} else if (hardcodedAnnotation.filter(h => h.keyword).length > 0) {
// if it matches our stored keywords, it is a keyword search
// Keyword searches do not contain labels, so switch to keyword search if no label exists
returnedAction = {
type: "Search",
term:
"http://purl.obolibrary.org/obo/" +
resource.feature.models.replace(":", "_"),
};
} else {
// Facet search on anatomy if it is not a keyword search
returnedAction = {
Expand Down
4 changes: 0 additions & 4 deletions src/mixins/DynamicMarkerMixin.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import markerZoomLevels from "../components/markerZoomLevelsHardCoded.js";
import { mapStores } from 'pinia';
import { useSettingsStore } from '../stores/settings';


// remove duplicates by stringifying the objects
const removeDuplicates = function (arrayOfAnything) {
if (!arrayOfAnything) return []
Expand Down Expand Up @@ -77,8 +75,6 @@ export default {
for (let j = 0; j < dataset.terms.length; j++) {
if (fma.includes(dataset.terms[j])) {
datasetAdjusted.terms.push(dataset.terms[j]);


}
}
markersOnFlatmap.push(datasetAdjusted);
Expand Down

0 comments on commit 47082cf

Please sign in to comment.