@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/dist/mapintegratedvuer.js +100910 -75566
- package/dist/mapintegratedvuer.umd.cjs +1867 -416
- package/dist/style.css +1 -1
- package/package.json +6 -3
- package/src/App.vue +1 -1
- package/src/components/viewers/MultiFlatmap.vue +8 -1
- package/src/mixins/ContentMixin.js +37 -10
- package/vite.config.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "0.7.
|
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": "
|
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": "
|
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
@@ -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(
|
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
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
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