diff --git a/package.json b/package.json index 34543da..91023f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sparc-dashboard-beta", - "version": "0.2.1", + "version": "0.2.2", "author": "Sam Kraft (https://Sparc.Science)", "private": false, "type": "module", diff --git a/src/assets/Model.js b/src/assets/Model.js index 488800a..c768dcb 100644 --- a/src/assets/Model.js +++ b/src/assets/Model.js @@ -13,8 +13,9 @@ class Img export class Dataset { constructor(dataset){ - this.Imgs = []; - dataset.forEach((img)=>this.Imgs.push(new Img(img))); + this.name = dataset.ImgName, + this.size = "...", + this.path = dataset.Path } } diff --git a/src/components/FlatmapViewer.vue b/src/components/FlatmapViewer.vue index 83c6c02..6d2c537 100644 --- a/src/components/FlatmapViewer.vue +++ b/src/components/FlatmapViewer.vue @@ -13,11 +13,13 @@ import { ref, inject, nextTick} from "vue"; import {FlatmapVuer, MultiFlatmapVuer} from '@abi-software/flatmapvuer'; import { useOpenerStore } from "../stores/opener"; + import { useLocationStore} from "../stores/locationSelect"; FlatmapVuer.props.flatmapAPI.default="https://mapcore-demo.org/devel/flatmap/v4/"; const disableFlatmapUI = true; let FlatmapReady = false; - + const locationStore = useLocationStore(); + locationStore.init() const emit = defineEmits(['setTitle']); emit('setTitle','Flatmap Selector'); @@ -31,11 +33,50 @@ function FlatmapSelected(data){ if(locationId===data.feature.featureId){return;} locationId = data.feature.featureId; locationLabel.value = data.label; + const locationMinMax = tempMapToMinMax(locationId); //send to image selector - emitter.emit("anatomical-location-selected",locationId) + emitter.emit("anatomical-location-selected",locationMinMax) +} +//this function is my temp work around to not having the map return anything useful +function tempMapToMinMax(id){ + switch(id) { + case 3: + return { + min: 0.0, + max: 0.1 + } + case 6: + return { + min: 0.1, + max: 0.2 + } + case 11: + return { + min: 0.2, + max: 0.3 + } + case 11: + return { + min: 0.3, + max: 0.4 + } + case 14: + return { + min: 0.4, + max: 0.5 + } + case 50: + return { + min: 0.5, + max: 0.7 + } + default: + return { + min:0.7, + max:0.8 + }; + } } - -