@abi-software/mapintegratedvuer 0.7.0-vue3.8 → 0.7.1-demo.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/mapintegratedvuer",
3
- "version": "0.7.0-vue3.8",
3
+ "version": "0.7.1-demo.0",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -42,12 +42,12 @@
42
42
  "*.js"
43
43
  ],
44
44
  "dependencies": {
45
- "@abi-software/flatmapvuer": "^0.6.0-vue3.8",
45
+ "@abi-software/flatmapvuer": "0.6.1-demo-0",
46
46
  "@abi-software/map-side-bar": "^1.7.0-vue3.4",
47
47
  "@abi-software/plotvuer": "^0.4.0-vue-3-alpha.10",
48
48
  "@abi-software/scaffoldvuer": "^0.4.0-vue3.6",
49
49
  "@abi-software/simulationvuer": "^0.7.0-vue-3-alpha.5",
50
- "@abi-software/svg-sprite": "^0.4.0-vue3-beta.0",
50
+ "@abi-software/svg-sprite": "0.4.0-vue3.3",
51
51
  "@cypress/vite-dev-server": "^5.0.7",
52
52
  "@element-plus/icons-vue": "^2.3.1",
53
53
  "@pinia/testing": "^0.1.3",
@@ -126,6 +126,9 @@
126
126
  }
127
127
  ]
128
128
  },
129
+ "overrides": {
130
+ "@abi-software/flatmapvuer": "$@abi-software/flatmapvuer"
131
+ },
129
132
  "browserslist": [
130
133
  "> 1%",
131
134
  "last 2 versions"
package/src/App.vue CHANGED
@@ -240,6 +240,6 @@ body {
240
240
  }
241
241
 
242
242
  .map-icon {
243
- color: $app-primary-color!important;
243
+ color: $app-primary-color;
244
244
  }
245
245
  </style>
@@ -98,7 +98,7 @@ export default {
98
98
  } else if ((this.activeSpecies === "Human Male") || (this.activeSpecies === "Human Female")) {
99
99
  //Dynamically construct the whole body scaffold for human and store it
100
100
  if (!("human" in this.scaffoldResource)) {
101
- this.scaffoldResource["human"] = await getBodyScaffoldInfo(storeeSettings.sparcApi, "human");
101
+ this.scaffoldResource["human"] = await getBodyScaffoldInfo(this.apiLocation, "human");
102
102
  }
103
103
  action = {
104
104
  contextCardUrl: this.scaffoldResource["human"].datasetInfo.contextCardUrl,
@@ -305,13 +305,17 @@ export default {
305
305
  }
306
306
 
307
307
  if (flatmapImp) {
308
+ // create the star marker
308
309
  let wrapperElement = document.createElement("div");
309
310
  wrapperElement.innerHTML = YellowStar;
310
311
 
312
+ // add it to the flatmap
311
313
  const markerIdentifier = flatmapImp.addMarker(marker, {
312
314
  element: wrapperElement,
313
315
  className: "highlight-marker"
314
316
  });
317
+
318
+ // update the store with the marker identifier
315
319
  this.settingsStore.updateFeaturedMarkerIdentifier({
316
320
  index,
317
321
  markerIdentifier,
@@ -362,9 +366,12 @@ export default {
362
366
 
363
367
  :deep(.maplibregl-marker) {
364
368
  &.standard-marker {
369
+ cursor: pointer !important;
365
370
  z-index: 2;
366
371
  }
367
372
  &.highlight-marker {
373
+ visibility: visible !important;
374
+ cursor: pointer !important;
368
375
  z-index: 1;
369
376
  div {
370
377
  scale: 0.5;
@@ -278,6 +278,7 @@ export default {
278
278
  } catch (error) {
279
279
  markerSpecies = undefined;
280
280
  }
281
+ this.updateFeatureMarkers([markerCurie], undefined)
281
282
  this.settingsStore.updateFeaturedMarker({
282
283
  identifier,
283
284
  marker: markerCurie,
@@ -286,19 +287,45 @@ export default {
286
287
  });
287
288
  });
288
289
  },
290
+ // Check if the old featured dataset api has any info
291
+ oldFeaturedDatasetApiHasInfo: async function () {
292
+ let response = await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)
293
+ let data = await response.json()
294
+ if (!data.identifiers || data.identifiers.length == 0) {
295
+ return false;
296
+ } else {
297
+ return data.identifiers;
298
+ }
299
+ },
300
+ // Check if the new featured dataset api has any info
301
+ newFeaturedDatasetApiHasInfo: async function () {
302
+ let response = await fetch(`${this.apiLocation}get_featured_dataset`)
303
+ let data = await response.json()
304
+ if (!data.datasets || data.datasets.length == 0) {
305
+ return false;
306
+ } else {
307
+ return data.datasets.map(d => d.id);
308
+ }
309
+ },
310
+
289
311
  /**
290
312
  * Get a list of featured datasets to display.
291
313
  */
292
- getFeaturedDatasets: function () {
293
- const local_this = this;
294
- fetch(`${this.apiLocation}get_featured_datasets_identifiers`)
295
- .then(response => response.json())
296
- .then(data => {
297
- this.settingsStore.updateFeatured(data.identifiers);
298
- data.identifiers.forEach(element => {
299
- local_this.getDatasetAnatomyInfo(element);
300
- });
301
- });
314
+ getFeaturedDatasets: async function () {
315
+ let datasetIds = [];
316
+
317
+ // Check the two api endpoints for featured datasets, old one first
318
+ let oldInfo = await this.oldFeaturedDatasetApiHasInfo();
319
+ if (oldInfo) datasetIds = oldInfo;
320
+ else {
321
+ let newInfo = await this.newFeaturedDatasetApiHasInfo();
322
+ if (newInfo) datasetIds = newInfo;
323
+ }
324
+ // Update the store with the new list of featured datasets
325
+ this.settingsStore.updateFeatured(datasetIds);
326
+ datasetIds.forEach(element => {
327
+ this.getDatasetAnatomyInfo(element)
328
+ });
302
329
  },
303
330
  zoomToFeatures: function () {
304
331
  return;
package/vite.config.js CHANGED
@@ -11,7 +11,7 @@ export default defineConfig(({ command, mode }) => {
11
11
  css: {
12
12
  preprocessorOptions: {
13
13
  scss: {
14
- additionalData: `@use '${pathSrc}/assets/styles' as *;`
14
+ additionalData: `@use './src/assets/styles' as *;`
15
15
  },
16
16
  },
17
17
  },