@abi-software/mapintegratedvuer 1.1.0-beta.5 → 1.1.1
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/README.md +15 -2
- package/dist/{ContentMixin-C35Jowvp.js → ContentMixin-mZX2duoM.js} +97 -61
- package/dist/Flatmap-9QQ19krS.js +146 -0
- package/dist/{Iframe-fcNscihB.js → Iframe-c0h0PhkG.js} +2 -2
- package/dist/{MultiFlatmap-BIT2tVyE.js → MultiFlatmap-ft_NGtN3.js} +82 -65
- package/dist/{Plot-B9xsWP2v.js → Plot-BmyzQ7ix.js} +2 -2
- package/dist/{Scaffold-DYoxAJI0.js → Scaffold-B7UCL6S4.js} +10924 -10527
- package/dist/{Simulation-s1KOrb80.js → Simulation-OLJ83BaS.js} +2 -2
- package/dist/{flatmapvuer-BM5z_95w.js → flatmapvuer-BAx-xO4L.js} +11714 -11457
- package/dist/{index-DIFC-Q9x.js → index-nmieCwQF.js} +4369 -4335
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +479 -479
- package/dist/style-UwGHggI4.js +62 -0
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/App.vue +10 -1
- package/src/components/ContentVuer.vue +10 -10
- package/src/components/FlatmapContextCard.vue +22 -10
- package/src/components/MapContent.vue +20 -2
- package/src/components/SplitDialog.vue +4 -4
- package/src/components/SplitFlow.vue +6 -9
- package/src/components/viewers/Flatmap.vue +50 -25
- package/src/components/viewers/MultiFlatmap.vue +59 -32
- package/src/components/viewers/Scaffold.vue +46 -24
- package/src/components.d.ts +0 -1
- package/src/mixins/ContentMixin.js +72 -3
- package/src/mixins/DynamicMarkerMixin.js +44 -25
- package/src/services/tagging.js +3 -4
- package/src/stores/settings.js +5 -1
- package/src/stores/splitFlow.js +42 -30
- package/dist/Flatmap-9P71mP5D.js +0 -128
- package/dist/style-B-Ps72EF.js +0 -50
package/src/components.d.ts
CHANGED
@@ -22,7 +22,6 @@ declare module 'vue' {
|
|
22
22
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
23
23
|
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
24
24
|
ElIconArrowUp: typeof import('@element-plus/icons-vue')['ArrowUp']
|
25
|
-
ElIconInfoFilled: typeof import('@element-plus/icons-vue')['InfoFilled']
|
26
25
|
ElInput: typeof import('element-plus/es')['ElInput']
|
27
26
|
ElMain: typeof import('element-plus/es')['ElMain']
|
28
27
|
ElOption: typeof import('element-plus/es')['ElOption']
|
@@ -17,6 +17,7 @@ function capitalise(text) {
|
|
17
17
|
|
18
18
|
/* eslint-disable no-alert, no-console */
|
19
19
|
export default {
|
20
|
+
emits: [ "flatmap-provenance-ready", "resource-selected", "species-changed"],
|
20
21
|
props: {
|
21
22
|
/**
|
22
23
|
* Object containing information for
|
@@ -37,11 +38,18 @@ export default {
|
|
37
38
|
syncMode() {
|
38
39
|
return this.splitFlowStore.syncMode;
|
39
40
|
},
|
41
|
+
useHelpModeDialog() {
|
42
|
+
return this.settingsStore.useHelpModeDialog;
|
43
|
+
},
|
40
44
|
},
|
41
45
|
mounted: function () {
|
42
46
|
EventBus.on("startHelp", () => {
|
43
47
|
this.startHelp();
|
44
48
|
});
|
49
|
+
|
50
|
+
this.multiflatmapRef = this.$refs.multiflatmap;
|
51
|
+
this.flatmapRef = this.$refs.flatmap;
|
52
|
+
this.scaffoldRef = this.$refs.scaffold;
|
45
53
|
},
|
46
54
|
methods: {
|
47
55
|
toggleSyncMode: function () {
|
@@ -404,7 +412,7 @@ export default {
|
|
404
412
|
});
|
405
413
|
}
|
406
414
|
},
|
407
|
-
|
415
|
+
flatmapMarkerZoomUpdate() {
|
408
416
|
return;
|
409
417
|
},
|
410
418
|
onResize: function () {
|
@@ -413,17 +421,66 @@ export default {
|
|
413
421
|
startHelp: function () {
|
414
422
|
if (this.isInHelp === false) {
|
415
423
|
this.helpMode = true;
|
416
|
-
window.addEventListener("mousedown", this.
|
424
|
+
window.addEventListener("mousedown", this.checkEndHelpMouseDown);
|
417
425
|
this.isInHelp = true;
|
418
426
|
}
|
419
427
|
},
|
420
428
|
endHelp: function () {
|
421
|
-
window.removeEventListener("mousedown", this.
|
429
|
+
window.removeEventListener("mousedown", this.checkEndHelpMouseDown);
|
422
430
|
this.helpMode = false;
|
423
431
|
setTimeout(() => {
|
424
432
|
this.isInHelp = false;
|
425
433
|
}, 200);
|
426
434
|
},
|
435
|
+
onHelpModeShowNext: function () {
|
436
|
+
this.helpModeActiveItem += 1;
|
437
|
+
},
|
438
|
+
onHelpModeLastItem: function (isLastItem) {
|
439
|
+
if (isLastItem) {
|
440
|
+
this.helpModeLastItem = true;
|
441
|
+
}
|
442
|
+
},
|
443
|
+
onFinishHelpMode: function () {
|
444
|
+
this.helpMode = false;
|
445
|
+
// reset help mode to default values
|
446
|
+
this.helpModeActiveItem = 0;
|
447
|
+
this.helpModeLastItem = false;
|
448
|
+
},
|
449
|
+
onTooltipShown: function () {
|
450
|
+
if (this.$refs.multiflatmap && this.$refs.multiflatmapHelp) {
|
451
|
+
this.$refs.multiflatmapHelp.toggleTooltipHighlight();
|
452
|
+
}
|
453
|
+
|
454
|
+
if (this.$refs.flatmap && this.$refs.flatmapHelp) {
|
455
|
+
this.$refs.flatmapHelp.toggleTooltipHighlight();
|
456
|
+
}
|
457
|
+
|
458
|
+
if (this.$refs.scaffold && this.$refs.scaffoldHelp) {
|
459
|
+
this.$refs.scaffoldHelp.toggleTooltipHighlight();
|
460
|
+
}
|
461
|
+
},
|
462
|
+
onMapTooltipShown: function () {
|
463
|
+
if (this.$refs.multiflatmap && this.$refs.multiflatmapHelp) {
|
464
|
+
this.$refs.multiflatmapHelp.toggleTooltipPinHighlight();
|
465
|
+
}
|
466
|
+
|
467
|
+
if (this.$refs.flatmap && this.$refs.flatmapHelp) {
|
468
|
+
this.$refs.flatmapHelp.toggleTooltipPinHighlight();
|
469
|
+
}
|
470
|
+
|
471
|
+
if (this.$refs.scaffold && this.$refs.scaffoldHelp) {
|
472
|
+
this.$refs.scaffoldHelp.toggleTooltipPinHighlight();
|
473
|
+
}
|
474
|
+
},
|
475
|
+
/**
|
476
|
+
* End help-mode only if user clicks outside of help mode dialog.
|
477
|
+
*/
|
478
|
+
checkEndHelpMouseDown: function (e) {
|
479
|
+
const el = e.target;
|
480
|
+
if (!el.closest('.help-mode-dialog')) {
|
481
|
+
this.endHelp();
|
482
|
+
}
|
483
|
+
},
|
427
484
|
},
|
428
485
|
data: function () {
|
429
486
|
return {
|
@@ -436,6 +493,11 @@ export default {
|
|
436
493
|
bottom: "0px",
|
437
494
|
},
|
438
495
|
helpMode: false,
|
496
|
+
helpModeActiveItem: 0,
|
497
|
+
helpModeLastItem: false,
|
498
|
+
multiflatmapRef: null,
|
499
|
+
flatmapRef: null,
|
500
|
+
scaffoldRef: null,
|
439
501
|
idNamePair: {},
|
440
502
|
scaffoldLoaded: false,
|
441
503
|
isInHelp: false,
|
@@ -449,4 +511,11 @@ export default {
|
|
449
511
|
if (this.settingsStore.sparcApi)
|
450
512
|
this.apiLocation = this.settingsStore.sparcApi;
|
451
513
|
},
|
514
|
+
watch: {
|
515
|
+
helpMode: function (newVal) {
|
516
|
+
if (!newVal) {
|
517
|
+
this.helpModeActiveItem = 0;
|
518
|
+
}
|
519
|
+
}
|
520
|
+
},
|
452
521
|
};
|
@@ -4,13 +4,36 @@ import { mapStores } from 'pinia';
|
|
4
4
|
import { useSettingsStore } from '../stores/settings';
|
5
5
|
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
/*
|
8
|
+
* Function to check markers visibility at the given zoom level.
|
9
|
+
* I have modified it to make sure the marker is displayed
|
10
|
+
* if the uberon is not present in the hardcoded zoom-level list.
|
11
|
+
*/
|
12
|
+
const checkMarkersAtZoomLevel = (flatmapImp, markers, zoomLevel, hoveredMarkers) => {
|
13
|
+
if (markers) {
|
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
|
+
};
|
14
37
|
|
15
38
|
/* eslint-disable no-alert, no-console */
|
16
39
|
export default {
|
@@ -26,14 +49,16 @@ export default {
|
|
26
49
|
payload: payload,
|
27
50
|
type: this.entry.type,
|
28
51
|
};
|
52
|
+
this.flatmapMarkerZoomUpdate(false, undefined);
|
29
53
|
this.$emit("resource-selected", result);
|
30
54
|
}
|
31
55
|
},
|
32
56
|
/**
|
33
57
|
* Function used for updating the flatmap markers.
|
34
|
-
*
|
58
|
+
* It will only update the markers if zoom level has changed or
|
59
|
+
* the force flag is true.
|
35
60
|
*/
|
36
|
-
|
61
|
+
flatmapMarkerZoomUpdate(force, flatmap) {
|
37
62
|
if (!this.flatmapReady) return;
|
38
63
|
|
39
64
|
let flatmapImp = flatmap;
|
@@ -41,22 +66,16 @@ export default {
|
|
41
66
|
flatmapImp = this.getFlatmapImp();
|
42
67
|
|
43
68
|
if (flatmapImp) {
|
44
|
-
let
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
markerClass += " hovered" // Space-separated CSS class names
|
54
|
-
markerCluster = false // Disable cluster when related dataset is hovered
|
69
|
+
let currentZoom = flatmapImp.getZoom()["zoom"];
|
70
|
+
if (force || this.zoomLevel !== currentZoom) {
|
71
|
+
this.zoomLevel = currentZoom;
|
72
|
+
flatmapImp.clearMarkers();
|
73
|
+
let markers = this.settingsStore.markers;
|
74
|
+
let hoveredMarkers = this.settingsStore.hoveredMarkers;
|
75
|
+
checkMarkersAtZoomLevel(flatmapImp, markers, this.zoomLevel, hoveredMarkers);
|
76
|
+
if (this.entry.type === "MultiFlatmap") {
|
77
|
+
this.restoreFeaturedMarkers(flatmapImp);
|
55
78
|
}
|
56
|
-
flatmapImp.addMarker(id, { className: markerClass, cluster: markerCluster })
|
57
|
-
})
|
58
|
-
if (this.entry.type === "MultiFlatmap") {
|
59
|
-
this.restoreFeaturedMarkers(flatmapImp);
|
60
79
|
}
|
61
80
|
}
|
62
81
|
},
|
@@ -65,7 +84,7 @@ export default {
|
|
65
84
|
flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
|
66
85
|
this.flatmapReady = true;
|
67
86
|
const flatmapImp = flatmap.mapImp;
|
68
|
-
this.
|
87
|
+
this.flatmapMarkerZoomUpdate(true, flatmapImp);
|
69
88
|
}
|
70
89
|
},
|
71
90
|
}
|
package/src/services/tagging.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import EventBus from '../components/EventBus';
|
1
2
|
export default {
|
2
3
|
sendEvent: function(data) {
|
3
4
|
const taggingData = {
|
@@ -20,9 +21,7 @@ export default {
|
|
20
21
|
console.table(taggingData);
|
21
22
|
}
|
22
23
|
|
23
|
-
//
|
24
|
-
|
25
|
-
dataLayer.push(taggingData);
|
26
|
-
}
|
24
|
+
// Emit data for GTM
|
25
|
+
EventBus.emit('trackEvent', taggingData);
|
27
26
|
}
|
28
27
|
}
|
package/src/stores/settings.js
CHANGED
@@ -24,6 +24,7 @@ export const useSettingsStore = defineStore('settings', {
|
|
24
24
|
featuredMarkerSpecies: [],
|
25
25
|
featuredDatasetIdentifiers: [],
|
26
26
|
helpDelay: 0,
|
27
|
+
useHelpModeDialog: false,
|
27
28
|
}
|
28
29
|
},
|
29
30
|
getters: {
|
@@ -143,6 +144,9 @@ export const useSettingsStore = defineStore('settings', {
|
|
143
144
|
},
|
144
145
|
updateFacetLabels(facetLabels) {
|
145
146
|
this.facetLabels = facetLabels;
|
146
|
-
}
|
147
|
+
},
|
148
|
+
updateUseHelpModeDialog(helpModeOption) {
|
149
|
+
this.useHelpModeDialog = helpModeOption;
|
150
|
+
},
|
147
151
|
}
|
148
152
|
});
|
package/src/stores/splitFlow.js
CHANGED
@@ -127,38 +127,42 @@ const findKeyWithId = (layout, id) => {
|
|
127
127
|
return Object.keys(layout).find(key => layout[key]["id"] === id);
|
128
128
|
}
|
129
129
|
|
130
|
+
const getOriginalState = () => {
|
131
|
+
return {
|
132
|
+
activeView: "singlepanel",
|
133
|
+
viewIcons: [
|
134
|
+
{ icon: "singlepanel", name: "Single view", min: 1 },
|
135
|
+
{ icon: "2horpanel", name: "Horizontal split", min: 2 },
|
136
|
+
{ icon: "2vertpanel", name: "Vertical split", min: 2 },
|
137
|
+
{ icon: "3panel", name: "Three panes", min: 3 },
|
138
|
+
{ icon: "4panel", name: "Four panes", min: 4 },
|
139
|
+
{ icon: "5panel", name: "Five panes", min: 5 },
|
140
|
+
{ icon: "6panel", name: "Six (horizontal)", min: 6 },
|
141
|
+
{ icon: "6panelVertical", name: "Six (vertical)", min: 6 },
|
142
|
+
//{ icon: "customise", name: "Customise", min: 2 }
|
143
|
+
],
|
144
|
+
customLayout: {
|
145
|
+
"split-1": {content: false, horizontal: false, children: ["pane-1"]},
|
146
|
+
"pane-1": {content: true, id: 1},
|
147
|
+
/*
|
148
|
+
Example layout
|
149
|
+
|
150
|
+
"split-1": {content: false, horizontal: true, children: ["split-2", "pane-1"]},
|
151
|
+
"split-2": {content: false, horizontal: false, children: ["pane-2", "pane-3"]},
|
152
|
+
"pane-1": {content: true, id: 1},
|
153
|
+
"pane-2": {content: true, id: 2},
|
154
|
+
"pane-3": {content: true, id: 3},
|
155
|
+
*/
|
156
|
+
},
|
157
|
+
splitters: { "first": 50, "second": 50, "third": 50 },
|
158
|
+
globalCallback: false,
|
159
|
+
syncMode: false,
|
160
|
+
};
|
161
|
+
}
|
162
|
+
|
130
163
|
export const useSplitFlowStore = defineStore('splitFlow', {
|
131
164
|
state: () => {
|
132
|
-
return
|
133
|
-
activeView: "singlepanel",
|
134
|
-
viewIcons: [
|
135
|
-
{ icon: "singlepanel", name: "Single view", min: 1 },
|
136
|
-
{ icon: "2horpanel", name: "Horizontal split", min: 2 },
|
137
|
-
{ icon: "2vertpanel", name: "Vertical split", min: 2 },
|
138
|
-
{ icon: "3panel", name: "Three panes", min: 3 },
|
139
|
-
{ icon: "4panel", name: "Four panes", min: 4 },
|
140
|
-
{ icon: "5panel", name: "Five panes", min: 5 },
|
141
|
-
{ icon: "6panel", name: "Six (horizontal)", min: 6 },
|
142
|
-
{ icon: "6panelVertical", name: "Six (vertical)", min: 6 },
|
143
|
-
//{ icon: "customise", name: "Customise", min: 2 }
|
144
|
-
],
|
145
|
-
customLayout: {
|
146
|
-
"split-1": {content: false, horizontal: false, children: ["pane-1"]},
|
147
|
-
"pane-1": {content: true, id: 1},
|
148
|
-
/*
|
149
|
-
Example layout
|
150
|
-
|
151
|
-
"split-1": {content: false, horizontal: true, children: ["split-2", "pane-1"]},
|
152
|
-
"split-2": {content: false, horizontal: false, children: ["pane-2", "pane-3"]},
|
153
|
-
"pane-1": {content: true, id: 1},
|
154
|
-
"pane-2": {content: true, id: 2},
|
155
|
-
"pane-3": {content: true, id: 3},
|
156
|
-
*/
|
157
|
-
},
|
158
|
-
splitters: { "first": 50, "second": 50, "third": 50 },
|
159
|
-
globalCallback: false,
|
160
|
-
syncMode: false,
|
161
|
-
}
|
165
|
+
return getOriginalState();
|
162
166
|
},
|
163
167
|
getters: {
|
164
168
|
getPaneNameById: (state) => (id) => {
|
@@ -318,6 +322,14 @@ export const useSplitFlowStore = defineStore('splitFlow', {
|
|
318
322
|
}
|
319
323
|
}
|
320
324
|
},
|
325
|
+
reset() {
|
326
|
+
const original = getOriginalState();
|
327
|
+
this.activeView = original.activeView;
|
328
|
+
this.customLayout = original.customLayout;
|
329
|
+
this.splitters = original.splitters;
|
330
|
+
this.globalCallback = original.globalCallback;
|
331
|
+
this.syncMode = original.syncMode;
|
332
|
+
},
|
321
333
|
closeSlot(payload) {
|
322
334
|
if (payload) {
|
323
335
|
this.syncMode = false;
|
package/dist/Flatmap-9P71mP5D.js
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
import { B as p } from "./flatmapvuer-BM5z_95w.js";
|
2
|
-
import { _ as m, t as f, E as s } from "./index-DIFC-Q9x.js";
|
3
|
-
import { C as c } from "./ContentMixin-C35Jowvp.js";
|
4
|
-
import { D as u } from "./style-B-Ps72EF.js";
|
5
|
-
import { resolveComponent as h, openBlock as d, createBlock as g } from "vue";
|
6
|
-
const y = {
|
7
|
-
name: "Flatmap",
|
8
|
-
mixins: [c, u],
|
9
|
-
components: {
|
10
|
-
FlatmapVuer: p
|
11
|
-
},
|
12
|
-
methods: {
|
13
|
-
getState: function() {
|
14
|
-
return this.$refs.flatmap.getState();
|
15
|
-
},
|
16
|
-
/**
|
17
|
-
* Perform a local search on this contentvuer
|
18
|
-
*/
|
19
|
-
search: function(e) {
|
20
|
-
return this.$refs.flatmap.searchAndShowResult(e);
|
21
|
-
},
|
22
|
-
getFlatmapImp() {
|
23
|
-
return this.$refs.flatmap.mapImp;
|
24
|
-
},
|
25
|
-
flatmaprResourceSelected: function(e, t) {
|
26
|
-
if (this.resourceSelected(
|
27
|
-
e,
|
28
|
-
t,
|
29
|
-
this.$refs.map.viewingMode === "Exploration"
|
30
|
-
), t.eventType === "click" && t.feature.type === "feature") {
|
31
|
-
const n = {
|
32
|
-
label: t.label || "",
|
33
|
-
id: t.feature.id || "",
|
34
|
-
featureId: t.feature.featureId || "",
|
35
|
-
taxonomy: t.taxonomy || "",
|
36
|
-
resources: t.resource.join(", ")
|
37
|
-
}, a = f(n);
|
38
|
-
Tagging.sendEvent({
|
39
|
-
event: "interaction_event",
|
40
|
-
event_name: "portal_maps_connectivity",
|
41
|
-
category: a,
|
42
|
-
location: e + " " + this.$refs.map.viewingMode
|
43
|
-
});
|
44
|
-
}
|
45
|
-
},
|
46
|
-
flatmapReadyCall: function(e) {
|
47
|
-
let t = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
|
48
|
-
s.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.getAvailableTerms(), this.entry.resource === "FunctionalConnectivity" && this.flatmapReadyForMarkerUpdates(e);
|
49
|
-
},
|
50
|
-
onPathwaySelectionChanged: function(e) {
|
51
|
-
const { label: t, property: n, checked: a, selectionsTitle: o } = e;
|
52
|
-
Tagging.sendEvent({
|
53
|
-
event: "interaction_event",
|
54
|
-
event_name: "portal_maps_pathway_change",
|
55
|
-
category: t + " [" + n + "] " + a,
|
56
|
-
location: o
|
57
|
-
});
|
58
|
-
},
|
59
|
-
highlightFeatures: function(e) {
|
60
|
-
let t = e.name;
|
61
|
-
const n = this.$refs.flatmap.mapImp;
|
62
|
-
if (t) {
|
63
|
-
const a = n.search(t);
|
64
|
-
a.featureIds[0] && n.highlightFeatures([
|
65
|
-
n.modelForFeature(a.featureIds[0])
|
66
|
-
]);
|
67
|
-
}
|
68
|
-
},
|
69
|
-
/**
|
70
|
-
* Append the list of suggested terms to suggestions
|
71
|
-
*/
|
72
|
-
searchSuggestions: function(e, t) {
|
73
|
-
e && this.$refs.flatmap.mapImp && this.$refs.flatmap.mapImp.search(e).__featureIds.forEach((a) => {
|
74
|
-
const o = this.$refs.flatmap.mapImp.annotation(a);
|
75
|
-
o && o.label && t.push(o.label);
|
76
|
-
});
|
77
|
-
},
|
78
|
-
zoomToFeatures: function(e, t) {
|
79
|
-
let n = e.name;
|
80
|
-
const a = this.$refs.flatmap.mapImp;
|
81
|
-
if (n) {
|
82
|
-
const o = a.search(n);
|
83
|
-
if (o.featureIds.length) {
|
84
|
-
let r = a.modelForFeature(o.featureIds[0]);
|
85
|
-
r ? (t && a.selectFeatures(r), a.zoomToFeatures(r)) : a.clearSearchResults();
|
86
|
-
}
|
87
|
-
} else
|
88
|
-
a.clearSearchResults();
|
89
|
-
}
|
90
|
-
},
|
91
|
-
computed: {
|
92
|
-
facetSpecies() {
|
93
|
-
return this.settingsStore.facets.species;
|
94
|
-
}
|
95
|
-
},
|
96
|
-
mounted: function() {
|
97
|
-
this.getAvailableTerms(), s.on("markerUpdate", () => {
|
98
|
-
this.flatmapMarkerUpdate(void 0);
|
99
|
-
});
|
100
|
-
}
|
101
|
-
};
|
102
|
-
function v(e, t, n, a, o, r) {
|
103
|
-
const i = h("FlatmapVuer");
|
104
|
-
return d(), g(i, {
|
105
|
-
state: e.entry.state,
|
106
|
-
entry: e.entry.resource,
|
107
|
-
onResourceSelected: t[0] || (t[0] = (l) => r.flatmaprResourceSelected(e.entry.type, l)),
|
108
|
-
onPanZoomCallback: e.flatmapPanZoomCallback,
|
109
|
-
name: e.entry.resource,
|
110
|
-
style: { height: "100%", width: "100%" },
|
111
|
-
minZoom: e.entry.minZoom,
|
112
|
-
helpMode: e.helpMode,
|
113
|
-
pathControls: !0,
|
114
|
-
ref: "flatmap",
|
115
|
-
onReady: r.flatmapReadyCall,
|
116
|
-
displayMinimap: !1,
|
117
|
-
displayWarning: !0,
|
118
|
-
enableOpenMapUI: !0,
|
119
|
-
flatmapAPI: e.flatmapAPI,
|
120
|
-
sparcAPI: e.apiLocation,
|
121
|
-
onOpenMap: e.openMap,
|
122
|
-
onPathwaySelectionChanged: r.onPathwaySelectionChanged
|
123
|
-
}, null, 8, ["state", "entry", "onPanZoomCallback", "name", "minZoom", "helpMode", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged"]);
|
124
|
-
}
|
125
|
-
const P = /* @__PURE__ */ m(y, [["render", v], ["__scopeId", "data-v-e72d1ef1"]]);
|
126
|
-
export {
|
127
|
-
P as default
|
128
|
-
};
|
package/dist/style-B-Ps72EF.js
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
import { mapStores as p } from "pinia";
|
2
|
-
import { u as n } from "./index-DIFC-Q9x.js";
|
3
|
-
const o = 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
|
-
...p(n)
|
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, a = this.settingsStore.hoveredMarkers;
|
33
|
-
r = o(r), a = o(a), e.clearMarkers(), r.forEach((s) => {
|
34
|
-
let i = "standard-marker", m = !0;
|
35
|
-
a.includes(s) && (i += " hovered", m = !1), e.addMarker(s, { className: i, cluster: m });
|
36
|
-
}), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(e);
|
37
|
-
}
|
38
|
-
},
|
39
|
-
flatmapReadyForMarkerUpdates: function(t) {
|
40
|
-
if (t) {
|
41
|
-
t.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
42
|
-
const e = t.mapImp;
|
43
|
-
this.flatmapMarkerUpdate(e);
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
};
|
48
|
-
export {
|
49
|
-
f as D
|
50
|
-
};
|