@abi-software/mapintegratedvuer 1.3.5-beta.0 → 1.4.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-Kgbrl_Sm.js +584 -0
- package/dist/Flatmap-CeqTJMXV.js +159 -0
- package/dist/Iframe-Dts_44jv.js +19 -0
- package/dist/MultiFlatmap-CwsjL6gP.js +332 -0
- package/dist/Plot-CONXSZVo.js +24 -0
- package/dist/Scaffold-CnBEdHaP.js +44390 -0
- package/dist/Simulation-BPZC017G.js +10622 -0
- package/dist/favicon.ico +0 -0
- package/dist/index-O_8s0SlM.js +58299 -0
- package/dist/index.html +18 -0
- package/dist/mapintegratedvuer.js +4 -0
- package/dist/mapintegratedvuer.umd.cjs +7483 -0
- package/dist/plotvuer-X4h-Lj3L.js +49187 -0
- package/dist/style-C4WSp4wW.js +98116 -0
- package/dist/style.css +1 -0
- package/package.json +6 -6
- package/src/App.vue +11 -3
- package/src/components/ContentBar.vue +1 -1
- package/src/components/ContextCard.vue +29 -8
- package/src/components/FlatmapContextCard.vue +2 -5
- package/src/components/MapContent.vue +6 -0
- package/src/components/viewers/Flatmap.vue +5 -3
- package/src/components/viewers/MultiFlatmap.vue +8 -0
- package/src/components/viewers/Scaffold.vue +7 -0
- package/src/mixins/DynamicMarkerMixin.js +9 -1
- package/src/stores/splitFlow.js +1 -1
@@ -0,0 +1,159 @@
|
|
1
|
+
import { _ as d, L as h, t as u, T as s, E as l } from "./index-O_8s0SlM.js";
|
2
|
+
import { C as I } from "./ContentMixin-Kgbrl_Sm.js";
|
3
|
+
import { D as y, W as g } from "./style-C4WSp4wW.js";
|
4
|
+
import { resolveComponent as p, openBlock as r, createElementBlock as M, createVNode as v, createBlock as S, createCommentVNode as C } from "vue";
|
5
|
+
const w = {
|
6
|
+
name: "Flatmap",
|
7
|
+
mixins: [I, y],
|
8
|
+
components: {
|
9
|
+
FlatmapVuer: g,
|
10
|
+
HelpModeDialog: h
|
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
|
+
var e;
|
24
|
+
return (e = this.$refs.flatmap) == null ? void 0 : e.mapImp;
|
25
|
+
},
|
26
|
+
flatmaprResourceSelected: function(e, t) {
|
27
|
+
if (this.resourceSelected(
|
28
|
+
e,
|
29
|
+
t,
|
30
|
+
this.$refs.flatmap.viewingMode === "Exploration"
|
31
|
+
), t.eventType === "click" && t.feature.type === "feature") {
|
32
|
+
const o = {
|
33
|
+
label: t.label || "",
|
34
|
+
id: t.feature.id || "",
|
35
|
+
featureId: t.feature.featureId || "",
|
36
|
+
taxonomy: t.taxonomy || "",
|
37
|
+
resources: t.resource.join(", ")
|
38
|
+
}, a = u(o);
|
39
|
+
s.sendEvent({
|
40
|
+
event: "interaction_event",
|
41
|
+
event_name: "portal_maps_connectivity",
|
42
|
+
category: a,
|
43
|
+
location: e + " " + this.$refs.flatmap.viewingMode
|
44
|
+
});
|
45
|
+
}
|
46
|
+
},
|
47
|
+
flatmapReadyCall: function(e) {
|
48
|
+
let t = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
|
49
|
+
l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.flatmapReadyForMarkerUpdates(e), l.emit("mapLoaded", e);
|
50
|
+
},
|
51
|
+
onPathwaySelectionChanged: function(e) {
|
52
|
+
const { label: t, property: o, checked: a, selectionsTitle: n } = e;
|
53
|
+
s.sendEvent({
|
54
|
+
event: "interaction_event",
|
55
|
+
event_name: "portal_maps_pathway_change",
|
56
|
+
category: t + " [" + o + "] " + a,
|
57
|
+
location: n
|
58
|
+
});
|
59
|
+
},
|
60
|
+
highlightFeatures: function(e) {
|
61
|
+
let t = e.name;
|
62
|
+
const o = this.$refs.flatmap.mapImp;
|
63
|
+
if (t) {
|
64
|
+
const a = o.search(t);
|
65
|
+
a.featureIds[0] && o.highlightFeatures([
|
66
|
+
o.modelForFeature(a.featureIds[0])
|
67
|
+
]);
|
68
|
+
}
|
69
|
+
},
|
70
|
+
/**
|
71
|
+
* Append the list of suggested terms to suggestions
|
72
|
+
*/
|
73
|
+
searchSuggestions: function(e, t) {
|
74
|
+
e && this.$refs.flatmap.mapImp && this.$refs.flatmap.mapImp.search(e).__featureIds.forEach((a) => {
|
75
|
+
const n = this.$refs.flatmap.mapImp.annotation(a);
|
76
|
+
n && n.label && t.push(n.label);
|
77
|
+
});
|
78
|
+
},
|
79
|
+
zoomToFeatures: function(e, t) {
|
80
|
+
let o = e.name;
|
81
|
+
const a = this.$refs.flatmap.mapImp;
|
82
|
+
if (o) {
|
83
|
+
const n = a.search(o);
|
84
|
+
if (n.featureIds.length) {
|
85
|
+
let i = a.modelForFeature(n.featureIds[0]);
|
86
|
+
i ? (t && a.selectFeatures(i), a.zoomToFeatures(i)) : a.clearSearchResults();
|
87
|
+
}
|
88
|
+
} else
|
89
|
+
a.clearSearchResults();
|
90
|
+
},
|
91
|
+
changeViewingMode: function(e) {
|
92
|
+
this.$refs.flatmap.changeViewingMode(e);
|
93
|
+
}
|
94
|
+
},
|
95
|
+
computed: {
|
96
|
+
facetSpecies() {
|
97
|
+
return this.settingsStore.facets.species;
|
98
|
+
}
|
99
|
+
},
|
100
|
+
mounted: function() {
|
101
|
+
l.on("markerUpdate", () => {
|
102
|
+
this.flatmapMarkerUpdate(void 0);
|
103
|
+
}), l.on("hoverUpdate", () => {
|
104
|
+
this.mapHoverHighlight(this.$refs.flatmap.mapImp);
|
105
|
+
}), l.on("show-connectivity", (e) => {
|
106
|
+
const { featureIds: t, offset: o } = e, a = this.$refs.flatmap;
|
107
|
+
a && a.moveMap(t, {
|
108
|
+
offsetX: o ? -150 : 0,
|
109
|
+
zoom: 4
|
110
|
+
});
|
111
|
+
});
|
112
|
+
}
|
113
|
+
}, F = { class: "viewer-container" };
|
114
|
+
function b(e, t, o, a, n, i) {
|
115
|
+
const m = p("FlatmapVuer"), f = p("HelpModeDialog");
|
116
|
+
return r(), M("div", F, [
|
117
|
+
v(m, {
|
118
|
+
state: e.entry.state,
|
119
|
+
entry: e.entry.resource,
|
120
|
+
onResourceSelected: t[0] || (t[0] = (c) => i.flatmaprResourceSelected(e.entry.type, c)),
|
121
|
+
onPanZoomCallback: e.flatmapPanZoomCallback,
|
122
|
+
name: e.entry.resource,
|
123
|
+
style: { height: "100%", width: "100%" },
|
124
|
+
minZoom: e.entry.minZoom,
|
125
|
+
helpMode: e.helpMode,
|
126
|
+
helpModeActiveItem: e.helpModeActiveItem,
|
127
|
+
helpModeInitialIndex: -1,
|
128
|
+
helpModeDialog: e.useHelpModeDialog,
|
129
|
+
onHelpModeLastItem: e.onHelpModeLastItem,
|
130
|
+
onShownTooltip: e.onTooltipShown,
|
131
|
+
onShownMapTooltip: e.onMapTooltipShown,
|
132
|
+
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
133
|
+
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
134
|
+
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
135
|
+
pathControls: !0,
|
136
|
+
ref: "flatmap",
|
137
|
+
onReady: i.flatmapReadyCall,
|
138
|
+
displayMinimap: !1,
|
139
|
+
displayWarning: !0,
|
140
|
+
enableOpenMapUI: !0,
|
141
|
+
flatmapAPI: e.flatmapAPI,
|
142
|
+
sparcAPI: e.apiLocation,
|
143
|
+
onOpenMap: e.openMap,
|
144
|
+
onPathwaySelectionChanged: i.onPathwaySelectionChanged
|
145
|
+
}, null, 8, ["state", "entry", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onConnectivityInfoOpen", "onConnectivityInfoClose", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged"]),
|
146
|
+
e.helpMode && e.useHelpModeDialog ? (r(), S(f, {
|
147
|
+
key: 0,
|
148
|
+
ref: "flatmapHelp",
|
149
|
+
flatmapRef: e.flatmapRef,
|
150
|
+
lastItem: e.helpModeLastItem,
|
151
|
+
onShowNext: e.onHelpModeShowNext,
|
152
|
+
onFinishHelpMode: e.onFinishHelpMode
|
153
|
+
}, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : C("", !0)
|
154
|
+
]);
|
155
|
+
}
|
156
|
+
const P = /* @__PURE__ */ d(w, [["render", b], ["__scopeId", "data-v-3b350e7b"]]);
|
157
|
+
export {
|
158
|
+
P as default
|
159
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { C as r } from "./ContentMixin-Kgbrl_Sm.js";
|
2
|
+
import { openBlock as o, createElementBlock as t, createElementVNode as s } from "vue";
|
3
|
+
import { _ as n } from "./index-O_8s0SlM.js";
|
4
|
+
const a = {
|
5
|
+
name: "Iframe",
|
6
|
+
mixins: [r]
|
7
|
+
}, c = { class: "map-iframe-container" }, i = ["src"];
|
8
|
+
function m(e, f, _, p, d, l) {
|
9
|
+
return o(), t("div", c, [
|
10
|
+
s("iframe", {
|
11
|
+
class: "my-iframe",
|
12
|
+
src: e.entry.resource.share_link
|
13
|
+
}, null, 8, i)
|
14
|
+
]);
|
15
|
+
}
|
16
|
+
const $ = /* @__PURE__ */ n(a, [["render", m], ["__scopeId", "data-v-60f8bfe1"]]);
|
17
|
+
export {
|
18
|
+
$ as default
|
19
|
+
};
|
@@ -0,0 +1,332 @@
|
|
1
|
+
import { _ as u, L as h, a as y, g, E as s, t as M, T as p } from "./index-O_8s0SlM.js";
|
2
|
+
import { C as v } from "./ContentMixin-Kgbrl_Sm.js";
|
3
|
+
import { D as I, v as S } from "./style-C4WSp4wW.js";
|
4
|
+
import { resolveComponent as f, openBlock as c, createElementBlock as C, createVNode as F, createBlock as k, createCommentVNode as w } from "vue";
|
5
|
+
const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>', d = (e) => {
|
6
|
+
const t = [
|
7
|
+
{
|
8
|
+
display: "Open AC Map",
|
9
|
+
key: "AC"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
display: "Open FC Map",
|
13
|
+
key: "FC"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
display: "Open 3D Human Map",
|
17
|
+
key: "3D"
|
18
|
+
}
|
19
|
+
];
|
20
|
+
switch (e) {
|
21
|
+
case "Human Male":
|
22
|
+
case "Human Female":
|
23
|
+
case "Rat":
|
24
|
+
t.push({
|
25
|
+
display: "Open Sync Map",
|
26
|
+
key: "SYNC"
|
27
|
+
});
|
28
|
+
break;
|
29
|
+
}
|
30
|
+
return t;
|
31
|
+
}, b = {
|
32
|
+
name: "MultiFlatmap",
|
33
|
+
mixins: [v, I],
|
34
|
+
components: {
|
35
|
+
MultiFlatmapVuer: S,
|
36
|
+
HelpModeDialog: h
|
37
|
+
},
|
38
|
+
data: function() {
|
39
|
+
return {
|
40
|
+
zoomLevel: 6,
|
41
|
+
flatmapReady: !1,
|
42
|
+
availableSpecies: y(),
|
43
|
+
scaffoldResource: {},
|
44
|
+
showStarInLegend: !1,
|
45
|
+
openMapOptions: d("Rat")
|
46
|
+
};
|
47
|
+
},
|
48
|
+
methods: {
|
49
|
+
/**
|
50
|
+
* Toggle sync mode on/off depending on species and current state
|
51
|
+
*/
|
52
|
+
toggleSyncMode: async function() {
|
53
|
+
if (this.syncMode == !1) {
|
54
|
+
let e;
|
55
|
+
this.activeSpecies === "Rat" ? e = {
|
56
|
+
contextCard: void 0,
|
57
|
+
discoverId: void 0,
|
58
|
+
label: "Rat Body",
|
59
|
+
resource: "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",
|
60
|
+
title: "View 3D scaffold",
|
61
|
+
layout: "2horpanel",
|
62
|
+
type: "SyncMap"
|
63
|
+
} : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await g(this.apiLocation, "human")), e = {
|
64
|
+
contextCardUrl: this.scaffoldResource.human.datasetInfo.contextCardUrl,
|
65
|
+
discoverId: this.scaffoldResource.human.datasetInfo.discoverId,
|
66
|
+
s3uri: this.scaffoldResource.human.datasetInfo.s3uri,
|
67
|
+
version: this.scaffoldResource.human.datasetInfo.version,
|
68
|
+
label: "Human Body",
|
69
|
+
resource: this.scaffoldResource.human.url,
|
70
|
+
title: "View 3D scaffold",
|
71
|
+
layout: "2vertpanel",
|
72
|
+
type: "SyncMap",
|
73
|
+
isBodyScaffold: !0
|
74
|
+
}), e && s.emit("SyncModeRequest", { flag: !0, action: e });
|
75
|
+
} else
|
76
|
+
s.emit("SyncModeRequest", { flag: !1 });
|
77
|
+
},
|
78
|
+
getState: function() {
|
79
|
+
if (this.flatmapReady)
|
80
|
+
return this.$refs.multiflatmap.getState();
|
81
|
+
},
|
82
|
+
flatmapPanZoomCallback: function(e) {
|
83
|
+
if (this.mouseHovered) {
|
84
|
+
const t = {
|
85
|
+
paneIndex: this.entry.id,
|
86
|
+
eventType: "panZoom",
|
87
|
+
payload: e,
|
88
|
+
type: this.entry.type
|
89
|
+
};
|
90
|
+
this.$emit("resource-selected", t);
|
91
|
+
}
|
92
|
+
},
|
93
|
+
/**
|
94
|
+
* Perform a local search on this contentvuer
|
95
|
+
*/
|
96
|
+
search: function(e) {
|
97
|
+
return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e, !0);
|
98
|
+
},
|
99
|
+
/**
|
100
|
+
* Append the list of suggested terms to suggestions
|
101
|
+
*/
|
102
|
+
searchSuggestions: function(e, t) {
|
103
|
+
const a = this.$refs.multiflatmap.getCurrentFlatmap();
|
104
|
+
e && a.mapImp && a.mapImp.search(e).__featureIds.forEach((o) => {
|
105
|
+
const i = a.mapImp.annotation(o);
|
106
|
+
i && i.label && t.push(i.label);
|
107
|
+
});
|
108
|
+
},
|
109
|
+
flatmaprResourceSelected: function(e, t) {
|
110
|
+
const a = this.$refs.multiflatmap.getCurrentFlatmap();
|
111
|
+
if (this.resourceSelected(e, t, a.viewingMode === "Exploration"), t.eventType === "click" && t.feature.type === "feature") {
|
112
|
+
const n = {
|
113
|
+
label: t.label || "",
|
114
|
+
id: t.feature.id || "",
|
115
|
+
featureId: t.feature.featureId || "",
|
116
|
+
taxonomy: t.taxonomy || "",
|
117
|
+
resources: t.resource.join(", ")
|
118
|
+
}, o = M(n);
|
119
|
+
p.sendEvent({
|
120
|
+
event: "interaction_event",
|
121
|
+
event_name: "portal_maps_connectivity",
|
122
|
+
category: o,
|
123
|
+
location: e + " " + a.viewingMode
|
124
|
+
});
|
125
|
+
}
|
126
|
+
},
|
127
|
+
onPathwaySelectionChanged: function(e) {
|
128
|
+
const { label: t, property: a, checked: n, selectionsTitle: o } = e;
|
129
|
+
p.sendEvent({
|
130
|
+
event: "interaction_event",
|
131
|
+
event_name: "portal_maps_pathway_change",
|
132
|
+
category: t + " [" + a + "] " + n,
|
133
|
+
location: o
|
134
|
+
});
|
135
|
+
},
|
136
|
+
onOpenPubmedUrl: function(e) {
|
137
|
+
p.sendEvent({
|
138
|
+
event: "interaction_event",
|
139
|
+
event_name: "portal_maps_pubmed_url",
|
140
|
+
file_path: e,
|
141
|
+
location: "map_popup_button"
|
142
|
+
});
|
143
|
+
},
|
144
|
+
/**
|
145
|
+
* Handle sync pan zoom event
|
146
|
+
*/
|
147
|
+
handleSyncPanZoomEvent: function(e) {
|
148
|
+
if (!this.mouseHovered && e.type !== this.entry.type) {
|
149
|
+
const t = e.payload.zoom, a = e.payload.target, n = this.$el.clientHeight, o = this.$el.clientWidth, i = Math.max(o, n);
|
150
|
+
let r = o / i / t;
|
151
|
+
const l = n / i / t, m = [
|
152
|
+
a[0] / 2 + 0.5 - r / 2,
|
153
|
+
0.5 - a[1] / 2 - l / 2
|
154
|
+
];
|
155
|
+
this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(m, [r, l]);
|
156
|
+
}
|
157
|
+
},
|
158
|
+
displayTooltip: function(e) {
|
159
|
+
if (e) {
|
160
|
+
let t = e.name;
|
161
|
+
t ? this.search(t) : this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
162
|
+
}
|
163
|
+
},
|
164
|
+
zoomToFeatures: function(e, t) {
|
165
|
+
let a = e.name;
|
166
|
+
const n = this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
|
167
|
+
if (a) {
|
168
|
+
const o = n.search(a);
|
169
|
+
o.featureIds.length > 0 ? (t && n.selectFeatures(o.featureIds), n.zoomToFeatures(o.featureIds)) : n.clearSearchResults();
|
170
|
+
} else
|
171
|
+
n.clearSearchResults();
|
172
|
+
},
|
173
|
+
highlightFeatures: function(e) {
|
174
|
+
let t = e.name;
|
175
|
+
const a = this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
|
176
|
+
if (t) {
|
177
|
+
const n = a.search(t);
|
178
|
+
n.featureIds.length > 0 && a.zoomToFeatures(n.featureIds, { noZoomIn: !0 });
|
179
|
+
}
|
180
|
+
},
|
181
|
+
updateProvCard: function() {
|
182
|
+
const e = this.getFlatmapImp();
|
183
|
+
if (e) {
|
184
|
+
let t = { id: this.entry.id, prov: e.provenance };
|
185
|
+
this.$emit("flatmap-provenance-ready", t);
|
186
|
+
}
|
187
|
+
},
|
188
|
+
flatmapChanged: async function(e) {
|
189
|
+
this.activeSpecies = e, this.openMapOptions = d(e), this.$emit("species-changed", e), this.entry.state && this.entry.state.species === this.activeSpecies || this.syncMode == !0 && await this.toggleSyncMode(), this.updateProvCard(), this.onConnectivityInfoClose(), p.sendEvent({
|
190
|
+
event: "interaction_event",
|
191
|
+
event_name: "portal_maps_species_change",
|
192
|
+
category: this.activeSpecies
|
193
|
+
});
|
194
|
+
},
|
195
|
+
multiFlatmapReady: function(e) {
|
196
|
+
if (e) {
|
197
|
+
e.enablePanZoomEvents(!0), this.flatmapReady = !0;
|
198
|
+
const t = e.mapImp;
|
199
|
+
this.flatmapMarkerUpdate(t), this.updateProvCard(), s.emit("mapLoaded", e);
|
200
|
+
}
|
201
|
+
},
|
202
|
+
getFlatmapImp: function() {
|
203
|
+
if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap)
|
204
|
+
return this.$refs.multiflatmap.getCurrentFlatmap().mapImp;
|
205
|
+
},
|
206
|
+
flatmapAreaSearch() {
|
207
|
+
let a = {
|
208
|
+
type: "Facets",
|
209
|
+
label: "Unused",
|
210
|
+
val: this.getFlatmapImp().visibleMarkerAnatomicalIds().map((n) => this.idNamePair[n])
|
211
|
+
};
|
212
|
+
s.emit("PopoverActionClick", a);
|
213
|
+
},
|
214
|
+
restoreFeaturedMarkers: function(e) {
|
215
|
+
this.settingsStore.resetFeaturedMarkerIdentifier();
|
216
|
+
const t = this.settingsStore.featuredMarkers;
|
217
|
+
this.updateFeaturedMarkers(t, e);
|
218
|
+
},
|
219
|
+
// updateFeaturedMarkers will step through the featured markers and add them to the map
|
220
|
+
updateFeaturedMarkers: function(e, t) {
|
221
|
+
this.showStarInLegend = !1;
|
222
|
+
for (let a = 0; a < e.length; ++a)
|
223
|
+
e[a] && (this.settingsStore.featuredMarkerIdentifiers[a] || this.addFeaturedMarker(e[a], a, t) && (this.showStarInLegend = !0));
|
224
|
+
},
|
225
|
+
// addFeaturedMarker: add a featured marker to the map at the specified uberon location
|
226
|
+
addFeaturedMarker: function(e, t, a) {
|
227
|
+
const n = this.settingsStore.featuredMarkerSpecies[t];
|
228
|
+
if (n && !this.activeSpecies.startsWith(n))
|
229
|
+
return !1;
|
230
|
+
let o = a;
|
231
|
+
if (o || (o = this.getFlatmapImp()), o) {
|
232
|
+
let i = document.createElement("div");
|
233
|
+
i.innerHTML = R;
|
234
|
+
const r = o.addMarker(e, {
|
235
|
+
element: i,
|
236
|
+
className: "highlight-marker",
|
237
|
+
cluster: !1
|
238
|
+
});
|
239
|
+
return this.settingsStore.updateFeaturedMarkerIdentifier({
|
240
|
+
index: t,
|
241
|
+
markerIdentifier: r
|
242
|
+
}), !0;
|
243
|
+
}
|
244
|
+
return !1;
|
245
|
+
},
|
246
|
+
/**
|
247
|
+
* Change the view mode of the current flatmap
|
248
|
+
*/
|
249
|
+
changeViewingMode: function(e) {
|
250
|
+
this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e);
|
251
|
+
}
|
252
|
+
},
|
253
|
+
computed: {
|
254
|
+
facetSpecies() {
|
255
|
+
return this.settingsStore.facets.species;
|
256
|
+
},
|
257
|
+
featuredMarkers() {
|
258
|
+
return this.settingsStore.featuredMarkers;
|
259
|
+
}
|
260
|
+
},
|
261
|
+
watch: {
|
262
|
+
syncMode: function(e) {
|
263
|
+
this.$refs.multiflatmap.getCurrentFlatmap() && this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e);
|
264
|
+
},
|
265
|
+
featuredMarkers: function(e) {
|
266
|
+
this.flatmapReady && this.updateFeaturedMarkers(e, void 0);
|
267
|
+
}
|
268
|
+
},
|
269
|
+
mounted: function() {
|
270
|
+
this.getFeaturedDatasets(), s.on("show-connectivity", (e) => {
|
271
|
+
const { featureIds: t, offset: a } = e;
|
272
|
+
if (this.flatmapReady && this.$refs.multiflatmap) {
|
273
|
+
const n = this.$refs.multiflatmap.getCurrentFlatmap();
|
274
|
+
n && n.moveMap(t, {
|
275
|
+
offsetX: a ? -150 : 0,
|
276
|
+
zoom: 4
|
277
|
+
});
|
278
|
+
}
|
279
|
+
}), s.on("markerUpdate", () => {
|
280
|
+
this.flatmapReady && this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
281
|
+
}), s.on("hoverUpdate", () => {
|
282
|
+
this.flatmapReady && this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
283
|
+
});
|
284
|
+
}
|
285
|
+
}, H = { class: "viewer-container" };
|
286
|
+
function L(e, t, a, n, o, i) {
|
287
|
+
const r = f("MultiFlatmapVuer"), l = f("HelpModeDialog");
|
288
|
+
return c(), C("div", H, [
|
289
|
+
F(r, {
|
290
|
+
availableSpecies: e.availableSpecies,
|
291
|
+
onFlatmapChanged: i.flatmapChanged,
|
292
|
+
onReady: i.multiFlatmapReady,
|
293
|
+
state: e.entry.state,
|
294
|
+
onResourceSelected: t[0] || (t[0] = (m) => i.flatmaprResourceSelected(e.entry.type, m)),
|
295
|
+
style: { height: "100%", width: "100%" },
|
296
|
+
initial: e.entry.resource,
|
297
|
+
helpMode: e.helpMode,
|
298
|
+
helpModeActiveItem: e.helpModeActiveItem,
|
299
|
+
helpModeDialog: e.useHelpModeDialog,
|
300
|
+
onHelpModeLastItem: e.onHelpModeLastItem,
|
301
|
+
onShownTooltip: e.onTooltipShown,
|
302
|
+
onShownMapTooltip: e.onMapTooltipShown,
|
303
|
+
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
304
|
+
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
305
|
+
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
306
|
+
ref: "multiflatmap",
|
307
|
+
displayMinimap: !0,
|
308
|
+
showStarInLegend: e.showStarInLegend,
|
309
|
+
enableOpenMapUI: !0,
|
310
|
+
openMapOptions: e.openMapOptions,
|
311
|
+
flatmapAPI: e.flatmapAPI,
|
312
|
+
sparcAPI: e.apiLocation,
|
313
|
+
onPanZoomCallback: i.flatmapPanZoomCallback,
|
314
|
+
onOpenMap: e.openMap,
|
315
|
+
onFinishHelpMode: e.endHelp,
|
316
|
+
onPathwaySelectionChanged: i.onPathwaySelectionChanged,
|
317
|
+
onOpenPubmedUrl: i.onOpenPubmedUrl
|
318
|
+
}, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onConnectivityInfoOpen", "onConnectivityInfoClose", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl"]),
|
319
|
+
e.helpMode && e.useHelpModeDialog ? (c(), k(l, {
|
320
|
+
key: 0,
|
321
|
+
ref: "multiflatmapHelp",
|
322
|
+
multiflatmapRef: e.multiflatmapRef,
|
323
|
+
lastItem: e.helpModeLastItem,
|
324
|
+
onShowNext: e.onHelpModeShowNext,
|
325
|
+
onFinishHelpMode: e.onFinishHelpMode
|
326
|
+
}, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : w("", !0)
|
327
|
+
]);
|
328
|
+
}
|
329
|
+
const E = /* @__PURE__ */ u(b, [["render", L], ["__scopeId", "data-v-d723825f"]]);
|
330
|
+
export {
|
331
|
+
E as default
|
332
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { C as o } from "./plotvuer-X4h-Lj3L.js";
|
2
|
+
import { C as a } from "./ContentMixin-Kgbrl_Sm.js";
|
3
|
+
import { resolveComponent as r, openBlock as n, createBlock as s } from "vue";
|
4
|
+
import { _ as m } from "./index-O_8s0SlM.js";
|
5
|
+
const p = {
|
6
|
+
name: "Plot",
|
7
|
+
mixins: [a],
|
8
|
+
components: {
|
9
|
+
PlotVuer: o
|
10
|
+
}
|
11
|
+
};
|
12
|
+
function l(e, c, u, d, i, f) {
|
13
|
+
const t = r("PlotVuer");
|
14
|
+
return n(), s(t, {
|
15
|
+
"data-source": e.entry.resource.dataSource,
|
16
|
+
metadata: e.entry.resource.metadata,
|
17
|
+
"supplemental-data": e.entry.resource.supplementalData,
|
18
|
+
style: { overflow: "hidden" }
|
19
|
+
}, null, 8, ["data-source", "metadata", "supplemental-data"]);
|
20
|
+
}
|
21
|
+
const $ = /* @__PURE__ */ m(p, [["render", l]]);
|
22
|
+
export {
|
23
|
+
$ as default
|
24
|
+
};
|