@abi-software/mapintegratedvuer 1.1.1 → 1.2.0-beta.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/{ContentMixin-mZX2duoM.js → ContentMixin-Chn7-LkR.js} +4 -5
- package/dist/{Flatmap-9QQ19krS.js → Flatmap-BYa1gZkN.js} +8 -8
- package/dist/{Iframe-c0h0PhkG.js → Iframe-D4Wz_j32.js} +2 -2
- package/dist/{MultiFlatmap-ft_NGtN3.js → MultiFlatmap-C7LuHtEN.js} +21 -21
- package/dist/{Plot-BmyzQ7ix.js → Plot-CI9rJRr9.js} +2 -2
- package/dist/{Scaffold-B7UCL6S4.js → Scaffold-J3mYovrG.js} +3 -3
- package/dist/{Simulation-OLJ83BaS.js → Simulation-B1pfz5o9.js} +2 -2
- package/dist/{flatmapvuer-BAx-xO4L.js → flatmapvuer-C31TbLvT.js} +39097 -34620
- package/dist/{index-nmieCwQF.js → index-CB15HPC-.js} +11621 -11793
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +514 -567
- package/dist/style-8EUTEKFl.js +51 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/SplitFlow.vue +14 -8
- package/src/components/viewers/Flatmap.vue +1 -1
- package/src/components/viewers/MultiFlatmap.vue +11 -15
- package/src/mixins/ContentMixin.js +2 -2
- package/src/mixins/DynamicMarkerMixin.js +28 -45
- package/dist/style-UwGHggI4.js +0 -62
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0-beta.0",
|
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.
|
52
|
-
"@abi-software/map-side-bar": "^2.2.
|
51
|
+
"@abi-software/flatmapvuer": "^1.1.2-alpha",
|
52
|
+
"@abi-software/map-side-bar": "^2.2.1-alpha-1",
|
53
53
|
"@abi-software/plotvuer": "1.0.0",
|
54
54
|
"@abi-software/scaffoldvuer": "^1.1.0",
|
55
55
|
"@abi-software/simulationvuer": "1.0.0",
|
@@ -28,6 +28,7 @@
|
|
28
28
|
@actionClick="actionClick"
|
29
29
|
@tabClicked="tabClicked"
|
30
30
|
@search-changed="searchChanged($event)"
|
31
|
+
@anatomy-in-datasets="updateMarkers($event)"
|
31
32
|
@hover-changed="hoverChanged($event)"
|
32
33
|
@contextUpdate="contextUpdate($event)"
|
33
34
|
@datalink-clicked="datalinkClicked($event)"
|
@@ -93,6 +94,7 @@ export default {
|
|
93
94
|
startUp: true,
|
94
95
|
search: '',
|
95
96
|
activeDockedId : 1,
|
97
|
+
hoveredMarkerDelay: undefined,
|
96
98
|
filterTriggered: false,
|
97
99
|
availableFacets: [],
|
98
100
|
}
|
@@ -257,7 +259,14 @@ export default {
|
|
257
259
|
hoverChanged: function (data) {
|
258
260
|
const hoverEntries = data && data.anatomy ? data.anatomy : []
|
259
261
|
this.settingsStore.updateHoveredMarkers(hoverEntries);
|
260
|
-
|
262
|
+
if (!hoverEntries.length) {
|
263
|
+
this.hoveredMarkerDelay = setTimeout(() => {
|
264
|
+
EventBus.emit("markerUpdate");
|
265
|
+
}, 3000)
|
266
|
+
} else {
|
267
|
+
clearTimeout(this.hoveredMarkerDelay)
|
268
|
+
EventBus.emit("markerUpdate");
|
269
|
+
}
|
261
270
|
},
|
262
271
|
searchChanged: function (data) {
|
263
272
|
if (data && data.type == "query-update") {
|
@@ -296,13 +305,10 @@ export default {
|
|
296
305
|
}
|
297
306
|
this.filterTriggered = false; // reset for next action
|
298
307
|
}
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
this.availableFacets = data.value.labels
|
305
|
-
}
|
308
|
+
},
|
309
|
+
updateMarkers: function (data) {
|
310
|
+
this.settingsStore.updateMarkers(data);
|
311
|
+
EventBus.emit("markerUpdate");
|
306
312
|
},
|
307
313
|
getNewEntryId: function() {
|
308
314
|
if (this.entries.length) {
|
@@ -155,7 +155,6 @@ export default {
|
|
155
155
|
payload: payload,
|
156
156
|
type: this.entry.type,
|
157
157
|
};
|
158
|
-
this.flatmapMarkerZoomUpdate(false, undefined);
|
159
158
|
this.$emit("resource-selected", result);
|
160
159
|
}
|
161
160
|
},
|
@@ -245,7 +244,6 @@ export default {
|
|
245
244
|
this.$refs.multiflatmap
|
246
245
|
.getCurrentFlatmap()
|
247
246
|
.mapImp.panZoomTo(origin, [sW, sH]);
|
248
|
-
this.flatmapMarkerZoomUpdate(false, undefined);
|
249
247
|
}
|
250
248
|
}
|
251
249
|
},
|
@@ -322,7 +320,7 @@ export default {
|
|
322
320
|
flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
|
323
321
|
this.flatmapReady = true;
|
324
322
|
const flatmapImp = flatmap.mapImp;
|
325
|
-
this.
|
323
|
+
this.flatmapMarkerUpdate(flatmapImp);
|
326
324
|
this.updateProvCard();
|
327
325
|
}
|
328
326
|
},
|
@@ -346,9 +344,9 @@ export default {
|
|
346
344
|
restoreFeaturedMarkers: function (flatmap) {
|
347
345
|
this.settingsStore.resetFeaturedMarkerIdentifier();
|
348
346
|
const markers = this.settingsStore.featuredMarkers;
|
349
|
-
this.
|
347
|
+
this.updateFeaturedMarkers(markers, flatmap);
|
350
348
|
},
|
351
|
-
|
349
|
+
updateFeaturedMarkers: function (markers, flatmap) {
|
352
350
|
this.showStarInLegend = false; // will show if we have a featured marker
|
353
351
|
for (let index = 0; index < markers.length; ++index) {
|
354
352
|
if (markers[index]) {
|
@@ -415,7 +413,7 @@ export default {
|
|
415
413
|
return;
|
416
414
|
}
|
417
415
|
|
418
|
-
this.
|
416
|
+
this.updateFeaturedMarkers(markers, undefined);
|
419
417
|
},
|
420
418
|
},
|
421
419
|
mounted: function () {
|
@@ -423,7 +421,7 @@ export default {
|
|
423
421
|
this.getFeaturedDatasets();
|
424
422
|
|
425
423
|
EventBus.on("markerUpdate", () => {
|
426
|
-
this.
|
424
|
+
this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
427
425
|
});
|
428
426
|
},
|
429
427
|
};
|
@@ -446,6 +444,12 @@ export default {
|
|
446
444
|
cursor: pointer !important;
|
447
445
|
z-index: 2;
|
448
446
|
}
|
447
|
+
&.hovered {
|
448
|
+
div {
|
449
|
+
scale: 2;
|
450
|
+
transform: translate(0px, -5px);
|
451
|
+
}
|
452
|
+
}
|
449
453
|
&.highlight-marker {
|
450
454
|
visibility: visible !important;
|
451
455
|
cursor: pointer !important;
|
@@ -455,14 +459,6 @@ export default {
|
|
455
459
|
transform: translate(45px, -7px);
|
456
460
|
}
|
457
461
|
}
|
458
|
-
&.hovered-marker {
|
459
|
-
cursor: pointer !important;
|
460
|
-
z-index: 2;
|
461
|
-
div {
|
462
|
-
scale: 2;
|
463
|
-
transform: translate(0px, -5px);
|
464
|
-
}
|
465
|
-
}
|
466
462
|
}
|
467
463
|
|
468
464
|
</style>
|
@@ -300,7 +300,7 @@ export default {
|
|
300
300
|
} catch (error) {
|
301
301
|
markerSpecies = undefined;
|
302
302
|
}
|
303
|
-
this.
|
303
|
+
this.updateFeaturedMarkers([markerCurie], undefined)
|
304
304
|
this.settingsStore.updateFeaturedMarker({
|
305
305
|
identifier,
|
306
306
|
marker: markerCurie,
|
@@ -412,7 +412,7 @@ export default {
|
|
412
412
|
});
|
413
413
|
}
|
414
414
|
},
|
415
|
-
|
415
|
+
flatmapMarkerUpdate() {
|
416
416
|
return;
|
417
417
|
},
|
418
418
|
onResize: function () {
|
@@ -4,36 +4,13 @@ import { mapStores } from 'pinia';
|
|
4
4
|
import { useSettingsStore } from '../stores/settings';
|
5
5
|
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
markers.forEach(id => {
|
15
|
-
let foundInArray = false;
|
16
|
-
// First check if uberon is in the list, check for zoom level
|
17
|
-
// if true. Note: markerZoomLevels is imported.
|
18
|
-
for (let i = 0; i < markerZoomLevels.length; i++) {
|
19
|
-
if (markerZoomLevels[i].id === id) {
|
20
|
-
foundInArray = true;
|
21
|
-
if (zoomLevel >= markerZoomLevels[i].showAtZoom) {
|
22
|
-
let markerClass = "standard-marker"
|
23
|
-
if (hoveredMarkers.includes(id)) markerClass = "hovered-marker"
|
24
|
-
flatmapImp.addMarker(id, { className: markerClass, cluster: false});
|
25
|
-
}
|
26
|
-
break;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
// Did not match, add it regardless so we do not lose any
|
30
|
-
// markers.
|
31
|
-
if (!foundInArray) {
|
32
|
-
flatmapImp.addMarker(id, {className: "standard-marker", cluster: false});
|
33
|
-
}
|
34
|
-
});
|
35
|
-
}
|
36
|
-
};
|
7
|
+
// remove duplicates by stringifying the objects
|
8
|
+
const removeDuplicates = function (arrayOfAnything) {
|
9
|
+
if (!arrayOfAnything) return []
|
10
|
+
return [...new Set(arrayOfAnything.map((e) => JSON.stringify(e)))].map((e) =>
|
11
|
+
JSON.parse(e)
|
12
|
+
)
|
13
|
+
}
|
37
14
|
|
38
15
|
/* eslint-disable no-alert, no-console */
|
39
16
|
export default {
|
@@ -49,16 +26,14 @@ export default {
|
|
49
26
|
payload: payload,
|
50
27
|
type: this.entry.type,
|
51
28
|
};
|
52
|
-
this.flatmapMarkerZoomUpdate(false, undefined);
|
53
29
|
this.$emit("resource-selected", result);
|
54
30
|
}
|
55
31
|
},
|
56
32
|
/**
|
57
33
|
* Function used for updating the flatmap markers.
|
58
|
-
*
|
59
|
-
* the force flag is true.
|
34
|
+
* We set the markers based on what was searched and the flatmap clusters them.
|
60
35
|
*/
|
61
|
-
|
36
|
+
flatmapMarkerUpdate(flatmap) {
|
62
37
|
if (!this.flatmapReady) return;
|
63
38
|
|
64
39
|
let flatmapImp = flatmap;
|
@@ -66,16 +41,24 @@ export default {
|
|
66
41
|
flatmapImp = this.getFlatmapImp();
|
67
42
|
|
68
43
|
if (flatmapImp) {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
44
|
+
// Set the dataset markers
|
45
|
+
let markers = this.settingsStore.markers;
|
46
|
+
markers = removeDuplicates(markers);
|
47
|
+
flatmapImp.clearMarkers();
|
48
|
+
flatmapImp.addDatasetMarkers(markers);
|
49
|
+
|
50
|
+
// Set the hovered markers
|
51
|
+
let hoveredMarkers = this.settingsStore.hoveredMarkers
|
52
|
+
hoveredMarkers = removeDuplicates(hoveredMarkers);
|
53
|
+
hoveredMarkers.forEach(id => {
|
54
|
+
let markerClass = "standard-marker" + " hovered" // Space-separated CSS class names
|
55
|
+
let markerCluster = false // Disable cluster when related dataset is hovered
|
56
|
+
flatmapImp.addMarker(id, { className: markerClass, cluster: markerCluster })
|
57
|
+
})
|
58
|
+
|
59
|
+
// Set the featured markers
|
60
|
+
if (this.entry.type === "MultiFlatmap") {
|
61
|
+
this.restoreFeaturedMarkers(flatmapImp);
|
79
62
|
}
|
80
63
|
}
|
81
64
|
},
|
@@ -84,7 +67,7 @@ export default {
|
|
84
67
|
flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
|
85
68
|
this.flatmapReady = true;
|
86
69
|
const flatmapImp = flatmap.mapImp;
|
87
|
-
this.
|
70
|
+
this.flatmapMarkerUpdate(flatmapImp);
|
88
71
|
}
|
89
72
|
},
|
90
73
|
}
|
package/dist/style-UwGHggI4.js
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
import { m as i } from "./ContentMixin-mZX2duoM.js";
|
2
|
-
import { mapStores as n } from "pinia";
|
3
|
-
import { u as f } from "./index-nmieCwQF.js";
|
4
|
-
const p = (e, r, t, o) => {
|
5
|
-
r && r.forEach((a) => {
|
6
|
-
let s = !1;
|
7
|
-
for (let m = 0; m < i.length; m++)
|
8
|
-
if (i[m].id === a) {
|
9
|
-
if (s = !0, t >= i[m].showAtZoom) {
|
10
|
-
let l = "standard-marker";
|
11
|
-
o.includes(a) && (l = "hovered-marker"), e.addMarker(a, { className: l, cluster: !1 });
|
12
|
-
}
|
13
|
-
break;
|
14
|
-
}
|
15
|
-
s || e.addMarker(a, { className: "standard-marker", cluster: !1 });
|
16
|
-
});
|
17
|
-
}, k = {
|
18
|
-
computed: {
|
19
|
-
...n(f)
|
20
|
-
},
|
21
|
-
methods: {
|
22
|
-
flatmapPanZoomCallback: function(e) {
|
23
|
-
if (this.mouseHovered) {
|
24
|
-
const r = {
|
25
|
-
paneIndex: this.entry.id,
|
26
|
-
eventType: "panZoom",
|
27
|
-
payload: e,
|
28
|
-
type: this.entry.type
|
29
|
-
};
|
30
|
-
this.flatmapMarkerZoomUpdate(!1, void 0), this.$emit("resource-selected", r);
|
31
|
-
}
|
32
|
-
},
|
33
|
-
/**
|
34
|
-
* Function used for updating the flatmap markers.
|
35
|
-
* It will only update the markers if zoom level has changed or
|
36
|
-
* the force flag is true.
|
37
|
-
*/
|
38
|
-
flatmapMarkerZoomUpdate(e, r) {
|
39
|
-
if (!this.flatmapReady)
|
40
|
-
return;
|
41
|
-
let t = r;
|
42
|
-
if (t || (t = this.getFlatmapImp()), t) {
|
43
|
-
let o = t.getZoom().zoom;
|
44
|
-
if (e || this.zoomLevel !== o) {
|
45
|
-
this.zoomLevel = o, t.clearMarkers();
|
46
|
-
let a = this.settingsStore.markers, s = this.settingsStore.hoveredMarkers;
|
47
|
-
p(t, a, this.zoomLevel, s), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(t);
|
48
|
-
}
|
49
|
-
}
|
50
|
-
},
|
51
|
-
flatmapReadyForMarkerUpdates: function(e) {
|
52
|
-
if (e) {
|
53
|
-
e.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
54
|
-
const r = e.mapImp;
|
55
|
-
this.flatmapMarkerZoomUpdate(!0, r);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
};
|
60
|
-
export {
|
61
|
-
k as D
|
62
|
-
};
|