@abi-software/mapintegratedvuer 1.2.0-beta.0 → 1.2.0-beta.2
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/{ContentMixin-Chn7-LkR.js → ContentMixin-B6Dt-gIO.js} +3 -2
- package/dist/{Flatmap-BYa1gZkN.js → Flatmap-BXFp07NV.js} +8 -8
- package/dist/{Iframe-D4Wz_j32.js → Iframe-V17rWVEo.js} +2 -2
- package/dist/{MultiFlatmap-C7LuHtEN.js → MultiFlatmap-IPV-kW9S.js} +15 -13
- package/dist/{Plot-CI9rJRr9.js → Plot-gbrHVZqT.js} +2 -2
- package/dist/{Scaffold-J3mYovrG.js → Scaffold-iZP8Wbdq.js} +5 -5
- package/dist/{Simulation-B1pfz5o9.js → Simulation-nCrQs5q-.js} +2 -2
- package/dist/{flatmapvuer-C31TbLvT.js → flatmapvuer-DR46R-h5.js} +30113 -29575
- package/dist/{index-CB15HPC-.js → index-B4DnOYh7.js} +3105 -3110
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +517 -517
- package/dist/style-DirL9q7N.js +53 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/SplitFlow.vue +5 -1
- package/src/components/viewers/MultiFlatmap.vue +6 -1
- package/src/components/viewers/Scaffold.vue +1 -1
- package/src/mixins/ContentMixin.js +3 -1
- package/src/mixins/DynamicMarkerMixin.js +9 -1
- package/src/stores/settings.js +5 -3
- package/dist/style-8EUTEKFl.js +0 -51
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.2.0-beta.
|
3
|
+
"version": "1.2.0-beta.2",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -48,8 +48,8 @@
|
|
48
48
|
"*.js"
|
49
49
|
],
|
50
50
|
"dependencies": {
|
51
|
-
"@abi-software/flatmapvuer": "^1.1.2-alpha",
|
52
|
-
"@abi-software/map-side-bar": "^2.2.1-alpha-
|
51
|
+
"@abi-software/flatmapvuer": "^1.1.2-alpha-3",
|
52
|
+
"@abi-software/map-side-bar": "^2.2.1-alpha-3",
|
53
53
|
"@abi-software/plotvuer": "1.0.0",
|
54
54
|
"@abi-software/scaffoldvuer": "^1.1.0",
|
55
55
|
"@abi-software/simulationvuer": "1.0.0",
|
@@ -29,6 +29,7 @@
|
|
29
29
|
@tabClicked="tabClicked"
|
30
30
|
@search-changed="searchChanged($event)"
|
31
31
|
@anatomy-in-datasets="updateMarkers($event)"
|
32
|
+
@number-of-datasets-for-anatomies="updateScaffoldMarkers($event)"
|
32
33
|
@hover-changed="hoverChanged($event)"
|
33
34
|
@contextUpdate="contextUpdate($event)"
|
34
35
|
@datalink-clicked="datalinkClicked($event)"
|
@@ -262,7 +263,7 @@ export default {
|
|
262
263
|
if (!hoverEntries.length) {
|
263
264
|
this.hoveredMarkerDelay = setTimeout(() => {
|
264
265
|
EventBus.emit("markerUpdate");
|
265
|
-
},
|
266
|
+
}, 500)
|
266
267
|
} else {
|
267
268
|
clearTimeout(this.hoveredMarkerDelay)
|
268
269
|
EventBus.emit("markerUpdate");
|
@@ -310,6 +311,9 @@ export default {
|
|
310
311
|
this.settingsStore.updateMarkers(data);
|
311
312
|
EventBus.emit("markerUpdate");
|
312
313
|
},
|
314
|
+
updateScaffoldMarkers: function (data) {
|
315
|
+
this.settingsStore.updateNumberOfDatasetsForFacets(data);
|
316
|
+
},
|
313
317
|
getNewEntryId: function() {
|
314
318
|
if (this.entries.length) {
|
315
319
|
return (this.entries[this.entries.length - 1]).id + 1;
|
@@ -342,10 +342,12 @@ export default {
|
|
342
342
|
EventBus.emit("PopoverActionClick", returnedAction);
|
343
343
|
},
|
344
344
|
restoreFeaturedMarkers: function (flatmap) {
|
345
|
+
|
345
346
|
this.settingsStore.resetFeaturedMarkerIdentifier();
|
346
347
|
const markers = this.settingsStore.featuredMarkers;
|
347
348
|
this.updateFeaturedMarkers(markers, flatmap);
|
348
349
|
},
|
350
|
+
// updateFeaturedMarkers will step through the featured markers and add them to the map
|
349
351
|
updateFeaturedMarkers: function (markers, flatmap) {
|
350
352
|
this.showStarInLegend = false; // will show if we have a featured marker
|
351
353
|
for (let index = 0; index < markers.length; ++index) {
|
@@ -362,6 +364,7 @@ export default {
|
|
362
364
|
}
|
363
365
|
}
|
364
366
|
},
|
367
|
+
// addFeaturedMarker: add a featured marker to the map at the specified uberon location
|
365
368
|
addFeaturedMarker: function (marker, index, flatmap) {
|
366
369
|
const markerSpecies =
|
367
370
|
this.settingsStore.featuredMarkerSpecies[index];
|
@@ -421,7 +424,9 @@ export default {
|
|
421
424
|
this.getFeaturedDatasets();
|
422
425
|
|
423
426
|
EventBus.on("markerUpdate", () => {
|
424
|
-
|
427
|
+
if (this.flatmapReady) {
|
428
|
+
this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
429
|
+
}
|
425
430
|
});
|
426
431
|
},
|
427
432
|
};
|
@@ -268,6 +268,7 @@ export default {
|
|
268
268
|
}
|
269
269
|
return { id, name };
|
270
270
|
},
|
271
|
+
// Get the species and andaotmy info for the featured datasets
|
271
272
|
getDatasetAnatomyInfo: function (identifier) {
|
272
273
|
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${identifier}`)
|
273
274
|
.then(response => response.json())
|
@@ -300,7 +301,8 @@ export default {
|
|
300
301
|
} catch (error) {
|
301
302
|
markerSpecies = undefined;
|
302
303
|
}
|
303
|
-
|
304
|
+
// can test the featured marker by uncommenting the line below:
|
305
|
+
// markerSpecies = "Rat"
|
304
306
|
this.settingsStore.updateFeaturedMarker({
|
305
307
|
identifier,
|
306
308
|
marker: markerCurie,
|
@@ -45,16 +45,24 @@ export default {
|
|
45
45
|
let markers = this.settingsStore.markers;
|
46
46
|
markers = removeDuplicates(markers);
|
47
47
|
flatmapImp.clearMarkers();
|
48
|
+
flatmapImp.clearDatasetMarkers();
|
48
49
|
flatmapImp.addDatasetMarkers(markers);
|
49
50
|
|
50
51
|
// Set the hovered markers
|
51
52
|
let hoveredMarkers = this.settingsStore.hoveredMarkers
|
52
|
-
|
53
|
+
let previousHoveredMarkers = this.settingsStore.previousHoveredMarkers
|
53
54
|
hoveredMarkers.forEach(id => {
|
54
55
|
let markerClass = "standard-marker" + " hovered" // Space-separated CSS class names
|
55
56
|
let markerCluster = false // Disable cluster when related dataset is hovered
|
56
57
|
flatmapImp.addMarker(id, { className: markerClass, cluster: markerCluster })
|
57
58
|
})
|
59
|
+
if (previousHoveredMarkers !== null && previousHoveredMarkers.length >= 0) {
|
60
|
+
previousHoveredMarkers.forEach(id => {
|
61
|
+
let markerClass = "standard-marker"
|
62
|
+
let markerCluster = true
|
63
|
+
flatmapImp.addMarker(id, { className: markerClass, cluster: markerCluster })
|
64
|
+
})
|
65
|
+
}
|
58
66
|
|
59
67
|
// Set the featured markers
|
60
68
|
if (this.entry.type === "MultiFlatmap") {
|
package/src/stores/settings.js
CHANGED
@@ -15,9 +15,10 @@ export const useSettingsStore = defineStore('settings', {
|
|
15
15
|
nlLinkPrefix: undefined,
|
16
16
|
rootUrl: undefined,
|
17
17
|
facets: { species: [], gender: [], organ: [] },
|
18
|
-
|
18
|
+
numberOfDatasetsForFacets: [],
|
19
19
|
markers: [],
|
20
20
|
hoveredMarkers: [],
|
21
|
+
previousHoveredMarkers: null,
|
21
22
|
featuredMarkers: [],
|
22
23
|
featuredMarkerIdentifiers: [],
|
23
24
|
featuredMarkerDois: [],
|
@@ -70,6 +71,7 @@ export const useSettingsStore = defineStore('settings', {
|
|
70
71
|
this.markers = markers;
|
71
72
|
},
|
72
73
|
updateHoveredMarkers(markers) {
|
74
|
+
this.previousHoveredMarkers = this.hoveredMarkers;
|
73
75
|
this.hoveredMarkers = markers;
|
74
76
|
},
|
75
77
|
updateFeatured(datasetIdentifiers) {
|
@@ -142,8 +144,8 @@ export const useSettingsStore = defineStore('settings', {
|
|
142
144
|
}
|
143
145
|
}
|
144
146
|
},
|
145
|
-
|
146
|
-
this.
|
147
|
+
updateNumberOfDatasetsForFacets(numberOfDatasetsForFacets) {
|
148
|
+
this.numberOfDatasetsForFacets = numberOfDatasetsForFacets;
|
147
149
|
},
|
148
150
|
updateUseHelpModeDialog(helpModeOption) {
|
149
151
|
this.useHelpModeDialog = helpModeOption;
|
package/dist/style-8EUTEKFl.js
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
import { mapStores as i } from "pinia";
|
2
|
-
import { u as o } from "./index-CB15HPC-.js";
|
3
|
-
const s = function(t) {
|
4
|
-
return t ? [...new Set(t.map((e) => JSON.stringify(e)))].map(
|
5
|
-
(e) => JSON.parse(e)
|
6
|
-
) : [];
|
7
|
-
}, f = {
|
8
|
-
computed: {
|
9
|
-
...i(o)
|
10
|
-
},
|
11
|
-
methods: {
|
12
|
-
flatmapPanZoomCallback: function(t) {
|
13
|
-
if (this.mouseHovered) {
|
14
|
-
const e = {
|
15
|
-
paneIndex: this.entry.id,
|
16
|
-
eventType: "panZoom",
|
17
|
-
payload: t,
|
18
|
-
type: this.entry.type
|
19
|
-
};
|
20
|
-
this.$emit("resource-selected", e);
|
21
|
-
}
|
22
|
-
},
|
23
|
-
/**
|
24
|
-
* Function used for updating the flatmap markers.
|
25
|
-
* We set the markers based on what was searched and the flatmap clusters them.
|
26
|
-
*/
|
27
|
-
flatmapMarkerUpdate(t) {
|
28
|
-
if (!this.flatmapReady)
|
29
|
-
return;
|
30
|
-
let e = t;
|
31
|
-
if (e || (e = this.getFlatmapImp()), e) {
|
32
|
-
let r = this.settingsStore.markers;
|
33
|
-
r = s(r), e.clearMarkers(), e.addDatasetMarkers(r);
|
34
|
-
let a = this.settingsStore.hoveredMarkers;
|
35
|
-
a = s(a), a.forEach((m) => {
|
36
|
-
e.addMarker(m, { className: "standard-marker hovered", cluster: !1 });
|
37
|
-
}), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(e);
|
38
|
-
}
|
39
|
-
},
|
40
|
-
flatmapReadyForMarkerUpdates: function(t) {
|
41
|
-
if (t) {
|
42
|
-
t.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
43
|
-
const e = t.mapImp;
|
44
|
-
this.flatmapMarkerUpdate(e);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
};
|
49
|
-
export {
|
50
|
-
f as D
|
51
|
-
};
|