@abi-software/mapintegratedvuer 1.6.0 → 1.6.3
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-CetX1ug9.js → ContentMixin-CWtYskLS.js} +8 -5
- package/dist/{Flatmap-CfapnFQ6.js → Flatmap-BsxLzsr9.js} +55 -45
- package/dist/{Iframe-CPMsJHLL.js → Iframe-Bsc3ZvDM.js} +2 -2
- package/dist/{MultiFlatmap-C9YhGVTK.js → MultiFlatmap-BoMGY3P5.js} +40 -103
- package/dist/{Plot-B5oQVpfQ.js → Plot-BLZ6qDEp.js} +2 -2
- package/dist/{Scaffold-DH-cWyUN.js → Scaffold-DpRCGJ34.js} +161 -162
- package/dist/{Simulation-vQXlk9Mc.js → Simulation-Dv3scr6u.js} +2 -2
- package/dist/{index-BzopGyiz.js → index-BGGZxwXr.js} +11757 -11660
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +470 -469
- package/dist/{style-CrjDxqUa.js → style-CmiFzzZy.js} +5032 -4934
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/src/components/ContentBar.vue +15 -0
- package/src/components/DialogToolbarContent.vue +5 -0
- package/src/components/SplitFlow.vue +7 -2
- package/src/components/viewers/Flatmap.vue +12 -1
- package/src/components/viewers/MultiFlatmap.vue +2 -127
- package/src/components/viewers/Scaffold.vue +1 -3
- package/src/mixins/ContentMixin.js +3 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
import "vue";
|
2
|
-
import { u as p, b as g, E as l, T as y,
|
2
|
+
import { u as p, b as g, E as l, T as y, c as m, d as w } from "./index-BGGZxwXr.js";
|
3
3
|
import { mapStores as A } from "pinia";
|
4
4
|
let c = 7, s = 5;
|
5
|
-
const
|
5
|
+
const v = [
|
6
6
|
{
|
7
7
|
id: "UBERON:0000948",
|
8
8
|
name: "heart",
|
@@ -253,7 +253,7 @@ const N = [
|
|
253
253
|
keyword: !0
|
254
254
|
}
|
255
255
|
];
|
256
|
-
function
|
256
|
+
function N(e) {
|
257
257
|
return e[0].toUpperCase() + e.substring(1);
|
258
258
|
}
|
259
259
|
const B = {
|
@@ -345,7 +345,7 @@ const B = {
|
|
345
345
|
if (e == "MultiFlatmap" || e == "Flatmap")
|
346
346
|
if (a.internalName = this.idNamePair[t.feature.models], t.eventType == "click")
|
347
347
|
if (a.eventType = "selected", t.feature.type == "marker") {
|
348
|
-
let d = this.idNamePair[t.feature.models], u =
|
348
|
+
let d = this.idNamePair[t.feature.models], u = v.filter(
|
349
349
|
(h) => h.id === t.feature.models
|
350
350
|
);
|
351
351
|
this.settingsStore.isFeaturedMarkerIdentifier(
|
@@ -369,7 +369,7 @@ const B = {
|
|
369
369
|
else t.eventType == "mouseenter" && (a.eventType = "highlighted", n = !0);
|
370
370
|
else e == "Scaffold" && (t && t[0] && ((((o = t[0].data) == null ? void 0 : o.id) === void 0 || ((r = t[0].data) == null ? void 0 : r.id) === "") && (t[0].data.id = (f = t[0].data) == null ? void 0 : f.group), a.internalName = t[0].data.id, t[0].data.lastActionOnMarker === !0 && (i = {
|
371
371
|
type: "Facet",
|
372
|
-
facet:
|
372
|
+
facet: N(t[0].data.id),
|
373
373
|
facetPropPath: "anatomy.organ.category.name",
|
374
374
|
term: "Anatomical structure"
|
375
375
|
})), a.eventType = "selected", n = !0);
|
@@ -552,6 +552,9 @@ const B = {
|
|
552
552
|
},
|
553
553
|
onConnectivityInfoClose: function() {
|
554
554
|
l.emit("connectivity-info-close");
|
555
|
+
},
|
556
|
+
onConnectivityGraphError: function(e) {
|
557
|
+
l.emit("connectivity-graph-error", e);
|
555
558
|
}
|
556
559
|
},
|
557
560
|
data: function() {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { C as I } from "./ContentMixin-
|
3
|
-
import { D as
|
4
|
-
import { resolveComponent as
|
1
|
+
import { _ as d, K as h, t as u, T as r, E as l } from "./index-BGGZxwXr.js";
|
2
|
+
import { C as I } from "./ContentMixin-CWtYskLS.js";
|
3
|
+
import { D as v, Q as y } from "./style-CmiFzzZy.js";
|
4
|
+
import { resolveComponent as s, openBlock as p, createElementBlock as g, createVNode as M, createBlock as S, createCommentVNode as C } from "vue";
|
5
5
|
const F = {
|
6
6
|
name: "Flatmap",
|
7
|
-
mixins: [I,
|
7
|
+
mixins: [I, v],
|
8
8
|
components: {
|
9
|
-
FlatmapVuer:
|
9
|
+
FlatmapVuer: y,
|
10
10
|
HelpModeDialog: h
|
11
11
|
},
|
12
12
|
methods: {
|
@@ -25,17 +25,17 @@ const F = {
|
|
25
25
|
},
|
26
26
|
flatmaprResourceSelected: function(e, t) {
|
27
27
|
if (this.resourceSelected(e, t), t.eventType === "click" && t.feature.type === "feature") {
|
28
|
-
const
|
28
|
+
const a = {
|
29
29
|
label: t.label || "",
|
30
30
|
id: t.feature.id || "",
|
31
31
|
featureId: t.feature.featureId || "",
|
32
32
|
taxonomy: t.taxonomy || "",
|
33
33
|
resources: t.resource.join(", ")
|
34
|
-
},
|
35
|
-
|
34
|
+
}, n = u(a);
|
35
|
+
r.sendEvent({
|
36
36
|
event: "interaction_event",
|
37
37
|
event_name: "portal_maps_connectivity",
|
38
|
-
category:
|
38
|
+
category: n,
|
39
39
|
location: e + " " + this.$refs.flatmap.viewingMode
|
40
40
|
});
|
41
41
|
}
|
@@ -45,21 +45,21 @@ const F = {
|
|
45
45
|
l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.flatmapReadyForMarkerUpdates(e), l.emit("mapLoaded", e);
|
46
46
|
},
|
47
47
|
onPathwaySelectionChanged: function(e) {
|
48
|
-
const { label: t, property:
|
49
|
-
|
48
|
+
const { label: t, property: a, checked: n, selectionsTitle: i } = e;
|
49
|
+
r.sendEvent({
|
50
50
|
event: "interaction_event",
|
51
51
|
event_name: "portal_maps_pathway_change",
|
52
|
-
category: t + " [" +
|
53
|
-
location:
|
52
|
+
category: t + " [" + a + "] " + n,
|
53
|
+
location: i
|
54
54
|
});
|
55
55
|
},
|
56
56
|
highlightFeatures: function(e) {
|
57
57
|
let t = e.name;
|
58
|
-
const
|
58
|
+
const a = this.$refs.flatmap.mapImp;
|
59
59
|
if (t) {
|
60
|
-
const
|
61
|
-
|
62
|
-
|
60
|
+
const n = a.search(t);
|
61
|
+
n.featureIds[0] && a.highlightFeatures([
|
62
|
+
a.modelForFeature(n.featureIds[0])
|
63
63
|
]);
|
64
64
|
}
|
65
65
|
},
|
@@ -67,22 +67,25 @@ const F = {
|
|
67
67
|
* Append the list of suggested terms to suggestions
|
68
68
|
*/
|
69
69
|
searchSuggestions: function(e, t) {
|
70
|
-
e && this.$refs.flatmap.mapImp
|
71
|
-
const
|
72
|
-
|
73
|
-
|
70
|
+
if (e && this.$refs.flatmap.mapImp) {
|
71
|
+
const a = this.$refs.flatmap.mapImp.search(e);
|
72
|
+
(a.__featureIds || a.featureIds).forEach((i) => {
|
73
|
+
const o = this.$refs.flatmap.mapImp.annotation(i);
|
74
|
+
o && o.label && t.push(o.label);
|
75
|
+
});
|
76
|
+
}
|
74
77
|
},
|
75
78
|
zoomToFeatures: function(e, t) {
|
76
|
-
let
|
77
|
-
const
|
78
|
-
if (
|
79
|
-
const
|
80
|
-
if (
|
81
|
-
let
|
82
|
-
|
79
|
+
let a = e.name;
|
80
|
+
const n = this.$refs.flatmap.mapImp;
|
81
|
+
if (a) {
|
82
|
+
const i = n.search(a);
|
83
|
+
if (i.featureIds.length) {
|
84
|
+
let o = n.modelForFeature(i.featureIds[0]);
|
85
|
+
o ? (t && n.selectFeatures(o), n.zoomToFeatures(o)) : n.clearSearchResults();
|
83
86
|
}
|
84
87
|
} else
|
85
|
-
|
88
|
+
n.clearSearchResults();
|
86
89
|
},
|
87
90
|
changeViewingMode: function(e) {
|
88
91
|
this.$refs.flatmap.changeViewingMode(e);
|
@@ -94,26 +97,29 @@ const F = {
|
|
94
97
|
}
|
95
98
|
},
|
96
99
|
mounted: function() {
|
97
|
-
l.on("
|
100
|
+
l.on("annotation-close", (e) => {
|
101
|
+
const t = this.$refs.flatmap;
|
102
|
+
e != null && e.tabClose && t && this.$refs.flatmap.annotationEventCallback({}, { type: "aborted" });
|
103
|
+
}), l.on("markerUpdate", () => {
|
98
104
|
this.flatmapMarkerUpdate(void 0);
|
99
105
|
}), l.on("hoverUpdate", () => {
|
100
106
|
this.mapHoverHighlight(this.$refs.flatmap.mapImp);
|
101
107
|
}), l.on("show-connectivity", (e) => {
|
102
|
-
const { featureIds: t, offset:
|
103
|
-
|
104
|
-
offsetX:
|
108
|
+
const { featureIds: t, offset: a } = e, n = this.$refs.flatmap;
|
109
|
+
n && n.moveMap(t, {
|
110
|
+
offsetX: a ? -150 : 0,
|
105
111
|
zoom: 4
|
106
112
|
});
|
107
113
|
});
|
108
114
|
}
|
109
115
|
}, w = { class: "viewer-container" };
|
110
|
-
function
|
111
|
-
const m =
|
112
|
-
return
|
113
|
-
|
116
|
+
function b(e, t, a, n, i, o) {
|
117
|
+
const m = s("FlatmapVuer"), f = s("HelpModeDialog");
|
118
|
+
return p(), g("div", w, [
|
119
|
+
M(m, {
|
114
120
|
state: e.entry.state,
|
115
121
|
entry: e.entry.resource,
|
116
|
-
onResourceSelected: t[0] || (t[0] = (
|
122
|
+
onResourceSelected: t[0] || (t[0] = (c) => o.flatmaprResourceSelected(e.entry.type, c)),
|
117
123
|
onPanZoomCallback: e.flatmapPanZoomCallback,
|
118
124
|
name: e.entry.resource,
|
119
125
|
style: { height: "100%", width: "100%" },
|
@@ -125,21 +131,25 @@ function $(e, t, o, a, n, i) {
|
|
125
131
|
onHelpModeLastItem: e.onHelpModeLastItem,
|
126
132
|
onShownTooltip: e.onTooltipShown,
|
127
133
|
onShownMapTooltip: e.onMapTooltipShown,
|
134
|
+
onAnnotationOpen: e.onAnnotationOpen,
|
135
|
+
onAnnotationClose: e.onAnnotationClose,
|
136
|
+
annotationSidebar: e.annotationSidebar,
|
128
137
|
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
129
138
|
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
139
|
+
onConnectivityGraphError: e.onConnectivityGraphError,
|
130
140
|
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
131
141
|
pathControls: !0,
|
132
142
|
ref: "flatmap",
|
133
|
-
onReady:
|
143
|
+
onReady: o.flatmapReadyCall,
|
134
144
|
displayMinimap: !1,
|
135
145
|
displayWarning: !0,
|
136
146
|
enableOpenMapUI: !0,
|
137
147
|
flatmapAPI: e.flatmapAPI,
|
138
148
|
sparcAPI: e.apiLocation,
|
139
149
|
onOpenMap: e.openMap,
|
140
|
-
onPathwaySelectionChanged:
|
141
|
-
}, null, 8, ["state", "entry", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onConnectivityInfoOpen", "onConnectivityInfoClose", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged"]),
|
142
|
-
e.helpMode && e.useHelpModeDialog ? (
|
150
|
+
onPathwaySelectionChanged: o.onPathwaySelectionChanged
|
151
|
+
}, null, 8, ["state", "entry", "onPanZoomCallback", "name", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "onReady", "flatmapAPI", "sparcAPI", "onOpenMap", "onPathwaySelectionChanged"]),
|
152
|
+
e.helpMode && e.useHelpModeDialog ? (p(), S(f, {
|
143
153
|
key: 0,
|
144
154
|
ref: "flatmapHelp",
|
145
155
|
flatmapRef: e.flatmapRef,
|
@@ -149,7 +159,7 @@ function $(e, t, o, a, n, i) {
|
|
149
159
|
}, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : C("", !0)
|
150
160
|
]);
|
151
161
|
}
|
152
|
-
const
|
162
|
+
const R = /* @__PURE__ */ d(F, [["render", b], ["__scopeId", "data-v-7635fa9b"]]);
|
153
163
|
export {
|
154
|
-
|
164
|
+
R as default
|
155
165
|
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { C as r } from "./ContentMixin-
|
1
|
+
import { C as r } from "./ContentMixin-CWtYskLS.js";
|
2
2
|
import { openBlock as o, createElementBlock as t, createElementVNode as s } from "vue";
|
3
|
-
import { _ as n } from "./index-
|
3
|
+
import { _ as n } from "./index-BGGZxwXr.js";
|
4
4
|
const a = {
|
5
5
|
name: "Iframe",
|
6
6
|
mixins: [r]
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { C as
|
3
|
-
import { D as
|
4
|
-
import { resolveComponent as
|
5
|
-
const
|
1
|
+
import { _ as u, K as h, a as y, g, E as r, t as M, T as p } from "./index-BGGZxwXr.js";
|
2
|
+
import { C as v } from "./ContentMixin-CWtYskLS.js";
|
3
|
+
import { D as I, a as C } from "./style-CmiFzzZy.js";
|
4
|
+
import { resolveComponent as f, openBlock as c, createElementBlock as S, createVNode as F, createBlock as k, createCommentVNode as w } from "vue";
|
5
|
+
const b = '<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
6
|
const t = [
|
7
7
|
{
|
8
8
|
display: "Open AC Map",
|
@@ -28,21 +28,21 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
28
28
|
break;
|
29
29
|
}
|
30
30
|
return t;
|
31
|
-
},
|
31
|
+
}, R = {
|
32
32
|
name: "MultiFlatmap",
|
33
|
-
mixins: [
|
33
|
+
mixins: [v, I],
|
34
34
|
components: {
|
35
|
-
MultiFlatmapVuer:
|
36
|
-
HelpModeDialog:
|
35
|
+
MultiFlatmapVuer: C,
|
36
|
+
HelpModeDialog: h
|
37
37
|
},
|
38
38
|
data: function() {
|
39
39
|
return {
|
40
40
|
zoomLevel: 6,
|
41
41
|
flatmapReady: !1,
|
42
|
-
availableSpecies:
|
42
|
+
availableSpecies: y(),
|
43
43
|
scaffoldResource: {},
|
44
44
|
showStarInLegend: !1,
|
45
|
-
openMapOptions:
|
45
|
+
openMapOptions: d("Human Male")
|
46
46
|
};
|
47
47
|
},
|
48
48
|
methods: {
|
@@ -60,7 +60,7 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
60
60
|
title: "View 3D scaffold",
|
61
61
|
layout: "2horpanel",
|
62
62
|
type: "SyncMap"
|
63
|
-
} : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await
|
63
|
+
} : (this.activeSpecies === "Human Male" || this.activeSpecies === "Human Female") && ("human" in this.scaffoldResource || (this.scaffoldResource.human = await g(this.apiLocation, "human")), e = {
|
64
64
|
contextCardUrl: this.scaffoldResource.human.datasetInfo.contextCardUrl,
|
65
65
|
discoverId: this.scaffoldResource.human.datasetInfo.discoverId,
|
66
66
|
s3uri: this.scaffoldResource.human.datasetInfo.s3uri,
|
@@ -103,8 +103,8 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
103
103
|
if (e && a.mapImp) {
|
104
104
|
const n = a.mapImp.search(e);
|
105
105
|
(n.__featureIds || n.featureIds).forEach((i) => {
|
106
|
-
const
|
107
|
-
|
106
|
+
const s = a.mapImp.annotation(i);
|
107
|
+
s && s.label && t.push(s.label);
|
108
108
|
});
|
109
109
|
}
|
110
110
|
},
|
@@ -117,8 +117,8 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
117
117
|
featureId: t.feature.featureId || "",
|
118
118
|
taxonomy: t.taxonomy || "",
|
119
119
|
resources: t.resource.join(", ")
|
120
|
-
}, o =
|
121
|
-
|
120
|
+
}, o = M(n);
|
121
|
+
p.sendEvent({
|
122
122
|
event: "interaction_event",
|
123
123
|
event_name: "portal_maps_connectivity",
|
124
124
|
category: o,
|
@@ -128,7 +128,7 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
128
128
|
},
|
129
129
|
onPathwaySelectionChanged: function(e) {
|
130
130
|
const { label: t, property: a, checked: n, selectionsTitle: o } = e;
|
131
|
-
|
131
|
+
p.sendEvent({
|
132
132
|
event: "interaction_event",
|
133
133
|
event_name: "portal_maps_pathway_change",
|
134
134
|
category: t + " [" + a + "] " + n,
|
@@ -136,7 +136,7 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
136
136
|
});
|
137
137
|
},
|
138
138
|
onOpenPubmedUrl: function(e) {
|
139
|
-
|
139
|
+
p.sendEvent({
|
140
140
|
event: "interaction_event",
|
141
141
|
event_name: "portal_maps_pubmed_url",
|
142
142
|
file_path: e,
|
@@ -149,12 +149,12 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
149
149
|
handleSyncPanZoomEvent: function(e) {
|
150
150
|
if (!this.mouseHovered && e.type !== this.entry.type) {
|
151
151
|
const t = e.payload.zoom, a = e.payload.target, n = this.$el.clientHeight, o = this.$el.clientWidth, i = Math.max(o, n);
|
152
|
-
let
|
153
|
-
const
|
154
|
-
a[0] / 2 + 0.5 -
|
155
|
-
0.5 - a[1] / 2 -
|
152
|
+
let s = o / i / t;
|
153
|
+
const l = n / i / t, m = [
|
154
|
+
a[0] / 2 + 0.5 - s / 2,
|
155
|
+
0.5 - a[1] / 2 - l / 2
|
156
156
|
];
|
157
|
-
this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(
|
157
|
+
this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(m, [s, l]);
|
158
158
|
}
|
159
159
|
},
|
160
160
|
displayTooltip: function(e) {
|
@@ -188,7 +188,7 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
188
188
|
}
|
189
189
|
},
|
190
190
|
flatmapChanged: async function(e) {
|
191
|
-
this.activeSpecies = e, this.openMapOptions =
|
191
|
+
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({
|
192
192
|
event: "interaction_event",
|
193
193
|
event_name: "portal_maps_species_change",
|
194
194
|
category: this.activeSpecies
|
@@ -232,15 +232,15 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
232
232
|
let o = a;
|
233
233
|
if (o || (o = this.getFlatmapImp()), o) {
|
234
234
|
let i = document.createElement("div");
|
235
|
-
i.innerHTML =
|
236
|
-
const
|
235
|
+
i.innerHTML = b;
|
236
|
+
const s = o.addMarker(e, {
|
237
237
|
element: i,
|
238
238
|
className: "highlight-marker",
|
239
239
|
cluster: !1
|
240
240
|
});
|
241
241
|
return this.settingsStore.updateFeaturedMarkerIdentifier({
|
242
242
|
index: t,
|
243
|
-
markerIdentifier:
|
243
|
+
markerIdentifier: s
|
244
244
|
}), !0;
|
245
245
|
}
|
246
246
|
return !1;
|
@@ -251,72 +251,8 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
251
251
|
changeViewingMode: function(e) {
|
252
252
|
this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e);
|
253
253
|
},
|
254
|
-
removeConnectivityTooltips: function() {
|
255
|
-
const e = this.$refs.multiflatmap.getCurrentFlatmap();
|
256
|
-
e != null && e.$el && e.$el.querySelectorAll(".flatmap-tooltip-popup").forEach((a) => a.remove());
|
257
|
-
},
|
258
|
-
createTooltipForConnectivity: function(e, t) {
|
259
|
-
const a = document.createElement("div");
|
260
|
-
a.classList.add("flatmap-feature-label"), e.forEach((n, o) => {
|
261
|
-
const { label: i } = n;
|
262
|
-
if (a.append(u(i)), o + 1 < e.length) {
|
263
|
-
const l = document.createElement("hr");
|
264
|
-
a.appendChild(l);
|
265
|
-
}
|
266
|
-
}), t.showPopup(
|
267
|
-
e[0].featureId,
|
268
|
-
a,
|
269
|
-
{
|
270
|
-
className: "custom-popup flatmap-tooltip-popup",
|
271
|
-
positionAtLastClick: !1,
|
272
|
-
preserveSelection: !0
|
273
|
-
}
|
274
|
-
);
|
275
|
-
},
|
276
|
-
emitConnectivityGraphError: function(e) {
|
277
|
-
if (e.length) {
|
278
|
-
const t = [...new Set(e)];
|
279
|
-
let a = "";
|
280
|
-
t.forEach((n, o) => {
|
281
|
-
const { label: i } = n;
|
282
|
-
a += o === 0 ? u(i) : i, t.length > 1 && (o + 2 === t.length ? a += " and " : o + 1 < t.length && (a += ", "));
|
283
|
-
}), a += " cannot be found on the map!", r.emit("connectivity-graph-error", {
|
284
|
-
data: a
|
285
|
-
});
|
286
|
-
}
|
287
|
-
},
|
288
254
|
showConnectivityTooltips: function(e) {
|
289
|
-
|
290
|
-
if (!a.length)
|
291
|
-
this.removeConnectivityTooltips();
|
292
|
-
else if (typeof a[0] == "object")
|
293
|
-
a.forEach((s) => {
|
294
|
-
o.push({
|
295
|
-
id: s.id,
|
296
|
-
label: s.name
|
297
|
-
});
|
298
|
-
});
|
299
|
-
else
|
300
|
-
for (let s = 0; s < a.length / 2; s++)
|
301
|
-
o.push({
|
302
|
-
id: a[s],
|
303
|
-
label: a[s + a.length / 2]
|
304
|
-
});
|
305
|
-
if (t && t.featureId && n.push(...t.featureId), this.flatmapReady) {
|
306
|
-
const s = this.$refs.multiflatmap.getCurrentFlatmap();
|
307
|
-
s.mapImp && (o.forEach((p, A) => {
|
308
|
-
const { id: c, label: y } = p, m = s.mapImp.search(c);
|
309
|
-
if (m != null && m.results.length) {
|
310
|
-
const v = m == null ? void 0 : m.results[0].featureId;
|
311
|
-
i.push({
|
312
|
-
featureId: v,
|
313
|
-
id: c,
|
314
|
-
label: y
|
315
|
-
}), n.push(c);
|
316
|
-
} else
|
317
|
-
l.push(p);
|
318
|
-
}), i.length ? this.createTooltipForConnectivity(i, s.mapImp) : (l.push(...o), this.removeConnectivityTooltips()), this.emitConnectivityGraphError(l), s.mapImp.zoomToFeatures(n, { noZoomIn: !0 }));
|
319
|
-
}
|
255
|
+
this.flatmapReady && this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e);
|
320
256
|
}
|
321
257
|
},
|
322
258
|
computed: {
|
@@ -355,16 +291,16 @@ const T = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
355
291
|
this.flatmapReady && this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
356
292
|
});
|
357
293
|
}
|
358
|
-
},
|
359
|
-
function
|
360
|
-
const
|
361
|
-
return
|
362
|
-
|
294
|
+
}, H = { class: "viewer-container" };
|
295
|
+
function L(e, t, a, n, o, i) {
|
296
|
+
const s = f("MultiFlatmapVuer"), l = f("HelpModeDialog");
|
297
|
+
return c(), S("div", H, [
|
298
|
+
F(s, {
|
363
299
|
availableSpecies: e.availableSpecies,
|
364
300
|
onFlatmapChanged: i.flatmapChanged,
|
365
301
|
onReady: i.multiFlatmapReady,
|
366
302
|
state: e.entry.state,
|
367
|
-
onResourceSelected: t[0] || (t[0] = (
|
303
|
+
onResourceSelected: t[0] || (t[0] = (m) => i.flatmaprResourceSelected(e.entry.type, m)),
|
368
304
|
style: { height: "100%", width: "100%" },
|
369
305
|
initial: e.entry.resource,
|
370
306
|
helpMode: e.helpMode,
|
@@ -378,6 +314,7 @@ function O(e, t, a, n, o, i) {
|
|
378
314
|
annotationSidebar: e.annotationSidebar,
|
379
315
|
onConnectivityInfoOpen: e.onConnectivityInfoOpen,
|
380
316
|
onConnectivityInfoClose: e.onConnectivityInfoClose,
|
317
|
+
onConnectivityGraphError: e.onConnectivityGraphError,
|
381
318
|
connectivityInfoSidebar: e.connectivityInfoSidebar,
|
382
319
|
ref: "multiflatmap",
|
383
320
|
displayMinimap: !0,
|
@@ -391,18 +328,18 @@ function O(e, t, a, n, o, i) {
|
|
391
328
|
onFinishHelpMode: e.endHelp,
|
392
329
|
onPathwaySelectionChanged: i.onPathwaySelectionChanged,
|
393
330
|
onOpenPubmedUrl: i.onOpenPubmedUrl
|
394
|
-
}, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl"]),
|
395
|
-
e.helpMode && e.useHelpModeDialog ? (
|
331
|
+
}, null, 8, ["availableSpecies", "onFlatmapChanged", "onReady", "state", "initial", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityGraphError", "connectivityInfoSidebar", "showStarInLegend", "openMapOptions", "flatmapAPI", "sparcAPI", "onPanZoomCallback", "onOpenMap", "onFinishHelpMode", "onPathwaySelectionChanged", "onOpenPubmedUrl"]),
|
332
|
+
e.helpMode && e.useHelpModeDialog ? (c(), k(l, {
|
396
333
|
key: 0,
|
397
334
|
ref: "multiflatmapHelp",
|
398
335
|
multiflatmapRef: e.multiflatmapRef,
|
399
336
|
lastItem: e.helpModeLastItem,
|
400
337
|
onShowNext: e.onHelpModeShowNext,
|
401
338
|
onFinishHelpMode: e.onFinishHelpMode
|
402
|
-
}, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) :
|
339
|
+
}, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : w("", !0)
|
403
340
|
]);
|
404
341
|
}
|
405
|
-
const
|
342
|
+
const T = /* @__PURE__ */ u(R, [["render", L], ["__scopeId", "data-v-4282737c"]]);
|
406
343
|
export {
|
407
|
-
|
344
|
+
T as default
|
408
345
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { y as o } from "./plotvuer-DSwGHaaa.js";
|
2
|
-
import { C as a } from "./ContentMixin-
|
2
|
+
import { C as a } from "./ContentMixin-CWtYskLS.js";
|
3
3
|
import { resolveComponent as r, openBlock as n, createBlock as s } from "vue";
|
4
|
-
import { _ as m } from "./index-
|
4
|
+
import { _ as m } from "./index-BGGZxwXr.js";
|
5
5
|
const p = {
|
6
6
|
name: "Plot",
|
7
7
|
mixins: [a],
|