@abi-software/mapintegratedvuer 1.3.4-beta.1 → 1.3.4-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-DFsTunqU.js +584 -0
- package/dist/{Flatmap-BS0JbWf4.js → Flatmap-LwWccT_N.js} +16 -13
- package/dist/{Iframe-BBXsetDo.js → Iframe-DKDovlWA.js} +2 -2
- package/dist/{MultiFlatmap-DbwZpIHe.js → MultiFlatmap-Ccqab9Pf.js} +12 -6
- package/dist/{Plot-C-epDDs-.js → Plot-TMU0MtDa.js} +2 -2
- package/dist/{Scaffold-BxKsRNwN.js → Scaffold-DJ2E8l90.js} +7235 -7237
- package/dist/{Simulation-DKwIFKMK.js → Simulation-VbpYdrJe.js} +2 -2
- package/dist/{index-Ct_Hq2A5.js → index-BQV8-ab4.js} +7082 -6432
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +479 -479
- package/dist/{style-DWdSlu_q.js → style-wUZezVCf.js} +2153 -2159
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/App.vue +6 -0
- package/src/components/ContentVuer.vue +3 -0
- package/src/components/MapContent.vue +4 -0
- package/src/components/SplitFlow.vue +5 -0
- package/src/components/viewers/Flatmap.vue +4 -2
- package/src/components/viewers/MultiFlatmap.vue +8 -3
- package/src/components/viewers/Scaffold.vue +6 -0
- package/src/mixins/ContentMixin.js +3 -27
- package/src/stores/splitFlow.js +28 -0
- package/dist/ContentMixin-Cx9C1_Yu.js +0 -1218
@@ -0,0 +1,584 @@
|
|
1
|
+
import { u as y, b as w, E as l, T as A, c as v, d as u, e as N } from "./index-BQV8-ab4.js";
|
2
|
+
import { mapStores as R } from "pinia";
|
3
|
+
let c = 7, r = 5;
|
4
|
+
const E = [
|
5
|
+
{
|
6
|
+
id: "UBERON:0000948",
|
7
|
+
name: "heart",
|
8
|
+
showAtZoom: 1
|
9
|
+
},
|
10
|
+
{
|
11
|
+
id: "UBERON:0001759",
|
12
|
+
name: "vagus nerve",
|
13
|
+
showAtZoom: 1
|
14
|
+
},
|
15
|
+
{
|
16
|
+
id: "UBERON:0001155",
|
17
|
+
name: "colon",
|
18
|
+
showAtZoom: 1
|
19
|
+
},
|
20
|
+
{
|
21
|
+
id: "UBERON:0000945",
|
22
|
+
name: "stomach",
|
23
|
+
showAtZoom: 1
|
24
|
+
},
|
25
|
+
{
|
26
|
+
id: "UBERON:0001013",
|
27
|
+
name: "adipose tissue",
|
28
|
+
showAtZoom: 1
|
29
|
+
},
|
30
|
+
{
|
31
|
+
id: "UBERON:0001255",
|
32
|
+
name: "urinary bladder",
|
33
|
+
showAtZoom: 1
|
34
|
+
},
|
35
|
+
{
|
36
|
+
id: "UBERON:0001348",
|
37
|
+
name: "brown adipose tissue",
|
38
|
+
showAtZoom: 6
|
39
|
+
},
|
40
|
+
{
|
41
|
+
id: "UBERON:0002008",
|
42
|
+
name: "cardiac nerve plexus",
|
43
|
+
showAtZoom: 1
|
44
|
+
},
|
45
|
+
{
|
46
|
+
id: "UBERON:0002240",
|
47
|
+
name: "spinal cord",
|
48
|
+
showAtZoom: 1
|
49
|
+
},
|
50
|
+
{
|
51
|
+
id: "UBERON:0002005",
|
52
|
+
name: "Enteric Nervous System",
|
53
|
+
showAtZoom: 4
|
54
|
+
},
|
55
|
+
{
|
56
|
+
id: "UBERON:0013702",
|
57
|
+
name: "body proper",
|
58
|
+
showAtZoom: 1
|
59
|
+
},
|
60
|
+
{
|
61
|
+
id: "UBERON:0002298",
|
62
|
+
name: "brainstem",
|
63
|
+
showAtZoom: 1
|
64
|
+
},
|
65
|
+
{
|
66
|
+
id: "UBERON:0002439",
|
67
|
+
name: "myenteric nerve plexus",
|
68
|
+
showAtZoom: 6
|
69
|
+
},
|
70
|
+
{
|
71
|
+
id: "UBERON:0000010",
|
72
|
+
name: "peripheral nervous system",
|
73
|
+
showAtZoom: 6
|
74
|
+
},
|
75
|
+
{
|
76
|
+
id: "UBERON:0002048",
|
77
|
+
name: "lung",
|
78
|
+
showAtZoom: 1
|
79
|
+
},
|
80
|
+
{
|
81
|
+
id: "UBERON:0002410",
|
82
|
+
name: "autonomic nervous system",
|
83
|
+
showAtZoom: 6
|
84
|
+
},
|
85
|
+
{
|
86
|
+
id: "UBERON:0002441",
|
87
|
+
name: "cervicothoracic ganglion",
|
88
|
+
showAtZoom: 6
|
89
|
+
},
|
90
|
+
{
|
91
|
+
id: "UBERON:0005363",
|
92
|
+
name: "inferior vagus X ganglion",
|
93
|
+
showAtZoom: 6
|
94
|
+
},
|
95
|
+
{
|
96
|
+
id: "UBERON:0001264",
|
97
|
+
name: "pancreas",
|
98
|
+
showAtZoom: 1
|
99
|
+
},
|
100
|
+
{
|
101
|
+
id: "UBERON:0001884",
|
102
|
+
name: "phrenic nerve",
|
103
|
+
showAtZoom: 6
|
104
|
+
},
|
105
|
+
{
|
106
|
+
id: "UBERON:0002059",
|
107
|
+
name: "submandibular ganglion",
|
108
|
+
showAtZoom: 7
|
109
|
+
},
|
110
|
+
{
|
111
|
+
id: "UBERON:0001347",
|
112
|
+
name: "white adipose tissue",
|
113
|
+
showAtZoom: 6
|
114
|
+
},
|
115
|
+
{
|
116
|
+
id: "UBERON:0001556",
|
117
|
+
name: "lower urinary tract",
|
118
|
+
showAtZoom: 1
|
119
|
+
},
|
120
|
+
{
|
121
|
+
id: "UBERON:0002262",
|
122
|
+
name: "celiac ganglion",
|
123
|
+
showAtZoom: 5
|
124
|
+
},
|
125
|
+
{
|
126
|
+
id: "UBERON:0000955",
|
127
|
+
name: "Brain",
|
128
|
+
showAtZoom: 1
|
129
|
+
},
|
130
|
+
{
|
131
|
+
id: "UBERON:0000160",
|
132
|
+
name: "intestine",
|
133
|
+
showAtZoom: 1
|
134
|
+
},
|
135
|
+
{
|
136
|
+
id: "UBERON:0001322",
|
137
|
+
name: "sciatic nerve",
|
138
|
+
showAtZoom: 1
|
139
|
+
},
|
140
|
+
{
|
141
|
+
id: "UBERON:0001649",
|
142
|
+
name: "glossopharyngeal nerve",
|
143
|
+
showAtZoom: 6
|
144
|
+
},
|
145
|
+
{
|
146
|
+
id: "UBERON:0002063",
|
147
|
+
name: "sinus venosus",
|
148
|
+
showAtZoom: 6
|
149
|
+
},
|
150
|
+
{
|
151
|
+
id: "UBERON:0002107",
|
152
|
+
name: "liver",
|
153
|
+
showAtZoom: 1
|
154
|
+
},
|
155
|
+
{
|
156
|
+
id: "UBERON:0002113",
|
157
|
+
name: "kidney",
|
158
|
+
showAtZoom: 1
|
159
|
+
},
|
160
|
+
{
|
161
|
+
id: "UBERON:0002481",
|
162
|
+
name: "bone tissue",
|
163
|
+
showAtZoom: 1
|
164
|
+
},
|
165
|
+
{
|
166
|
+
id: "UBERON:0004907",
|
167
|
+
name: "lower digestive tract",
|
168
|
+
showAtZoom: 4
|
169
|
+
},
|
170
|
+
{
|
171
|
+
id: "UBERON:0000044",
|
172
|
+
name: "Dorsal root ganglion",
|
173
|
+
showAtZoom: 5
|
174
|
+
},
|
175
|
+
// New levels from Keeran
|
176
|
+
{
|
177
|
+
id: "UBERON:0001736",
|
178
|
+
name: "Submandibular gland",
|
179
|
+
showAtZoom: c,
|
180
|
+
keyword: !0
|
181
|
+
},
|
182
|
+
{
|
183
|
+
id: "UBERON:0001103",
|
184
|
+
name: "Diaphragm",
|
185
|
+
showAtZoom: r,
|
186
|
+
keyword: !0
|
187
|
+
},
|
188
|
+
{
|
189
|
+
id: "UBERON:0001160",
|
190
|
+
name: "Fundus of stomach",
|
191
|
+
showAtZoom: r,
|
192
|
+
keyword: !0
|
193
|
+
},
|
194
|
+
{
|
195
|
+
id: "UBERON:0000955",
|
196
|
+
name: "Brain",
|
197
|
+
showAtZoom: r,
|
198
|
+
keyword: !0
|
199
|
+
},
|
200
|
+
{
|
201
|
+
id: "UBERON:0003708",
|
202
|
+
name: "Carotid sinus",
|
203
|
+
showAtZoom: c,
|
204
|
+
keyword: !0
|
205
|
+
},
|
206
|
+
{
|
207
|
+
id: "UBERON:0002079",
|
208
|
+
name: "Left cardiac atrium",
|
209
|
+
showAtZoom: r,
|
210
|
+
keyword: !0
|
211
|
+
},
|
212
|
+
{
|
213
|
+
id: "ILX:0485722",
|
214
|
+
name: "Nodose ganglion",
|
215
|
+
showAtZoom: c,
|
216
|
+
keyword: !0
|
217
|
+
},
|
218
|
+
{
|
219
|
+
id: "UBERON:0002078",
|
220
|
+
name: "Right cardiac atrium",
|
221
|
+
showAtZoom: r,
|
222
|
+
keyword: !0
|
223
|
+
},
|
224
|
+
{
|
225
|
+
id: "UBERON:0002084",
|
226
|
+
name: "Heart left ventricle",
|
227
|
+
showAtZoom: r,
|
228
|
+
keyword: !0
|
229
|
+
},
|
230
|
+
{
|
231
|
+
id: "UBERON:0002080",
|
232
|
+
name: "Heart right ventricle",
|
233
|
+
showAtZoom: r,
|
234
|
+
keyword: !0
|
235
|
+
},
|
236
|
+
{
|
237
|
+
id: "UBERON:0001508",
|
238
|
+
name: "Arch of Aorta",
|
239
|
+
showAtZoom: r,
|
240
|
+
keyword: !0
|
241
|
+
},
|
242
|
+
{
|
243
|
+
id: "UBERON:0001738",
|
244
|
+
name: "Thyroid cartilage",
|
245
|
+
showAtZoom: r,
|
246
|
+
keyword: !0
|
247
|
+
},
|
248
|
+
{
|
249
|
+
id: "UBERON:0000388",
|
250
|
+
name: "Epiglottis",
|
251
|
+
showAtZoom: r,
|
252
|
+
keyword: !0
|
253
|
+
}
|
254
|
+
];
|
255
|
+
function B(e) {
|
256
|
+
return e[0].toUpperCase() + e.substring(1);
|
257
|
+
}
|
258
|
+
const U = {
|
259
|
+
emits: ["flatmap-provenance-ready", "resource-selected", "species-changed"],
|
260
|
+
props: {
|
261
|
+
/**
|
262
|
+
* Object containing information for
|
263
|
+
* the required viewing.
|
264
|
+
*/
|
265
|
+
entry: Object,
|
266
|
+
visible: {
|
267
|
+
type: Boolean,
|
268
|
+
default: !0
|
269
|
+
},
|
270
|
+
mouseHovered: {
|
271
|
+
type: Boolean,
|
272
|
+
default: !1
|
273
|
+
}
|
274
|
+
},
|
275
|
+
computed: {
|
276
|
+
...R(y, w),
|
277
|
+
idNamePair() {
|
278
|
+
return this.splitFlowStore.idNamePair;
|
279
|
+
},
|
280
|
+
syncMode() {
|
281
|
+
return this.splitFlowStore.syncMode;
|
282
|
+
},
|
283
|
+
useHelpModeDialog() {
|
284
|
+
return this.settingsStore.useHelpModeDialog;
|
285
|
+
},
|
286
|
+
connectivityInfoSidebar() {
|
287
|
+
return this.settingsStore.connectivityInfoSidebar;
|
288
|
+
}
|
289
|
+
},
|
290
|
+
mounted: function() {
|
291
|
+
l.on("startHelp", () => {
|
292
|
+
this.startHelp();
|
293
|
+
}), this.multiflatmapRef = this.$refs.multiflatmap, this.flatmapRef = this.$refs.flatmap, this.scaffoldRef = this.$refs.scaffold;
|
294
|
+
},
|
295
|
+
methods: {
|
296
|
+
toggleSyncMode: function() {
|
297
|
+
},
|
298
|
+
getState: function() {
|
299
|
+
},
|
300
|
+
openMap: function(e) {
|
301
|
+
e === "SYNC" ? (this.toggleSyncMode(), this.trackOpenMap("toggle_map_sync_mode")) : (l.emit("OpenNewMap", e), this.trackOpenMap(`open_new_${e}_map`)), this.onConnectivityInfoClose();
|
302
|
+
},
|
303
|
+
trackOpenMap: function(e) {
|
304
|
+
A.sendEvent({
|
305
|
+
event: "interaction_event",
|
306
|
+
event_name: "portal_maps_open_map",
|
307
|
+
category: e,
|
308
|
+
location: "open_new_map"
|
309
|
+
});
|
310
|
+
},
|
311
|
+
updateWithViewUrl: function() {
|
312
|
+
},
|
313
|
+
/**
|
314
|
+
* Perform a local search on this contentvuer
|
315
|
+
*/
|
316
|
+
search: function() {
|
317
|
+
return !1;
|
318
|
+
},
|
319
|
+
/**
|
320
|
+
* Get a list of search suggestions on this contentvuer
|
321
|
+
*/
|
322
|
+
searchSuggestions: function() {
|
323
|
+
},
|
324
|
+
/**
|
325
|
+
* Callback when the vuers emit a selected event.
|
326
|
+
*/
|
327
|
+
resourceSelected: function(e, t, i) {
|
328
|
+
var f, d, m;
|
329
|
+
if (this.resourceHasAction(t)) {
|
330
|
+
l.emit("PopoverActionClick", t);
|
331
|
+
return;
|
332
|
+
}
|
333
|
+
let n, s = "none", o = !1;
|
334
|
+
const a = {
|
335
|
+
paneIndex: this.entry.id,
|
336
|
+
type: e,
|
337
|
+
resource: t,
|
338
|
+
internalName: void 0,
|
339
|
+
eventType: void 0
|
340
|
+
};
|
341
|
+
if (e == "MultiFlatmap" || e == "Flatmap")
|
342
|
+
if (a.internalName = this.idNamePair[t.feature.models], t.eventType == "click")
|
343
|
+
if (a.eventType = "selected", t.feature.type == "marker") {
|
344
|
+
let p = this.idNamePair[t.feature.models], g = E.filter(
|
345
|
+
(h) => h.id === t.feature.models
|
346
|
+
);
|
347
|
+
this.settingsStore.isFeaturedMarkerIdentifier(
|
348
|
+
t.feature.id
|
349
|
+
) ? n = {
|
350
|
+
type: "Search",
|
351
|
+
term: this.settingsStore.featuredMarkerDoi(
|
352
|
+
t.feature.id
|
353
|
+
),
|
354
|
+
featuredDataset: !0
|
355
|
+
} : g.filter((h) => h.keyword).length > 0 ? n = {
|
356
|
+
type: "Search",
|
357
|
+
term: "http://purl.obolibrary.org/obo/" + t.feature.models.replace(":", "_")
|
358
|
+
} : n = {
|
359
|
+
type: "Facet",
|
360
|
+
facet: p,
|
361
|
+
facetPropPath: "anatomy.organ.category.name",
|
362
|
+
term: "Anatomical structure"
|
363
|
+
}, o = !0, e == "MultiFlatmap" && this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults();
|
364
|
+
} else
|
365
|
+
t.feature.type == "feature" && (this.syncMode ? o = !0 : s = "scaffold");
|
366
|
+
else
|
367
|
+
t.eventType == "mouseenter" && (a.eventType = "highlighted", o = !0);
|
368
|
+
else
|
369
|
+
e == "Scaffold" && (t && t[0] && ((((f = t[0].data) == null ? void 0 : f.id) === void 0 || ((d = t[0].data) == null ? void 0 : d.id) === "") && (t[0].data.id = (m = t[0].data) == null ? void 0 : m.group), a.internalName = t[0].data.id, t[0].data.lastActionOnMarker === !0 && (n = {
|
370
|
+
type: "Facet",
|
371
|
+
facet: B(t[0].data.id),
|
372
|
+
facetPropPath: "anatomy.organ.category.name",
|
373
|
+
term: "Anatomical structure"
|
374
|
+
})), a.eventType = "selected", o = !0, s = "search");
|
375
|
+
n === void 0 && i && (n = v(a, s)), n && l.emit("PopoverActionClick", n), o && this.$emit("resource-selected", a);
|
376
|
+
},
|
377
|
+
resourceHasAction: function(e) {
|
378
|
+
return e.type === "URL" || e.type === "Search" || e.type === "Neuron Search" || e.type == "Facet" || e.type == "Facets";
|
379
|
+
},
|
380
|
+
/**
|
381
|
+
* Check if this viewer is currently visible
|
382
|
+
*/
|
383
|
+
isVisible: function() {
|
384
|
+
return this.splitFlowStore.getPaneNameById(this.entry.id) !== void 0;
|
385
|
+
},
|
386
|
+
displayTooltip: function() {
|
387
|
+
},
|
388
|
+
/**
|
389
|
+
* Get the term to zoom/highlight in a synchronisation event,
|
390
|
+
* if it cannot be found in the map, it will perform several
|
391
|
+
* calls to try to ge a valid name/id.
|
392
|
+
*/
|
393
|
+
getNameAndIdFromSyncData: async function(e) {
|
394
|
+
let t = e.internalName;
|
395
|
+
t === void 0 && e.resource && (t = e.resource.label);
|
396
|
+
let i;
|
397
|
+
if (e.resource && e.resource.resource && (i = e.resource.resource[0]), this.entry.type === "Scaffold") {
|
398
|
+
if (this.$refs.scaffold.findObjectsWithGroupName(t).length === 0) {
|
399
|
+
if (e.resource && e.resource.feature) {
|
400
|
+
const o = u(e.resource.feature.models);
|
401
|
+
if (o.length > 0)
|
402
|
+
return o;
|
403
|
+
}
|
404
|
+
let s = N(t);
|
405
|
+
if (s)
|
406
|
+
return s;
|
407
|
+
if (i && e.eventType === "selected")
|
408
|
+
return fetch(`${this.apiLocation}get-related-terms/${i}`).then((o) => o.json()).then((o) => {
|
409
|
+
if (o.uberon.array.length > 0)
|
410
|
+
return t = o.uberon.array[0].name.charAt(0).toUpperCase() + o.uberon.array[0].name.slice(1), i = o.uberon.array[0].id.toUpperCase(), { id: i, name: t };
|
411
|
+
});
|
412
|
+
}
|
413
|
+
} else if (this.entry.type === "MultiFlatmap")
|
414
|
+
if (t === "Bladder")
|
415
|
+
t = "Urinary Bladder";
|
416
|
+
else {
|
417
|
+
const n = u(t);
|
418
|
+
n.length > 0 && (t = n[0]);
|
419
|
+
}
|
420
|
+
return { id: i, name: t };
|
421
|
+
},
|
422
|
+
// Get the species and andaotmy info for the featured datasets
|
423
|
+
getDatasetAnatomyInfo: function(e) {
|
424
|
+
fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then((t) => t.json()).then((t) => {
|
425
|
+
const i = t.result[0];
|
426
|
+
let n;
|
427
|
+
try {
|
428
|
+
n = i.anatomy.organ[0].curie;
|
429
|
+
} catch {
|
430
|
+
n = void 0;
|
431
|
+
}
|
432
|
+
let s;
|
433
|
+
try {
|
434
|
+
s = i.item.curie;
|
435
|
+
} catch {
|
436
|
+
s = void 0;
|
437
|
+
}
|
438
|
+
let o;
|
439
|
+
try {
|
440
|
+
let a = 0, f = !1;
|
441
|
+
for (; !f && a < i.organisms.subject.length; ) {
|
442
|
+
const d = i.organisms.subject[a];
|
443
|
+
d.species && (o = d.species.name, f = !0), a += 1;
|
444
|
+
}
|
445
|
+
} catch {
|
446
|
+
o = void 0;
|
447
|
+
}
|
448
|
+
this.settingsStore.updateFeaturedMarker({
|
449
|
+
identifier: e,
|
450
|
+
marker: n,
|
451
|
+
doi: s,
|
452
|
+
species: o
|
453
|
+
});
|
454
|
+
});
|
455
|
+
},
|
456
|
+
// Check if the old featured dataset api has any info
|
457
|
+
oldFeaturedDatasetApiHasInfo: async function() {
|
458
|
+
let t = await (await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();
|
459
|
+
return !t.identifiers || t.identifiers.length == 0 ? !1 : t.identifiers;
|
460
|
+
},
|
461
|
+
// Check if the new featured dataset api has any info
|
462
|
+
newFeaturedDatasetApiHasInfo: async function() {
|
463
|
+
let t = await (await fetch(`${this.apiLocation}get_featured_dataset`)).json();
|
464
|
+
return !t.datasets || t.datasets.length == 0 ? !1 : t.datasets.map((i) => i.id);
|
465
|
+
},
|
466
|
+
/**
|
467
|
+
* Get a list of featured datasets to display.
|
468
|
+
*/
|
469
|
+
getFeaturedDatasets: async function() {
|
470
|
+
let e = [], t = await this.oldFeaturedDatasetApiHasInfo();
|
471
|
+
if (t)
|
472
|
+
e = t;
|
473
|
+
else {
|
474
|
+
let i = await this.newFeaturedDatasetApiHasInfo();
|
475
|
+
i && (e = i);
|
476
|
+
}
|
477
|
+
this.settingsStore.updateFeatured(e), e.forEach((i) => {
|
478
|
+
this.getDatasetAnatomyInfo(i);
|
479
|
+
});
|
480
|
+
},
|
481
|
+
zoomToFeatures: function() {
|
482
|
+
},
|
483
|
+
handleSyncMouseEvent: async function(e) {
|
484
|
+
let t = await this.getNameAndIdFromSyncData(e);
|
485
|
+
e.eventType === "highlighted" ? this.highlightFeatures(t) : e.eventType === "selected" && this.displayTooltip(t);
|
486
|
+
},
|
487
|
+
/**
|
488
|
+
* Handle sync pan zoom event
|
489
|
+
*/
|
490
|
+
handleSyncPanZoomEvent: function() {
|
491
|
+
},
|
492
|
+
highlightFeatures: function() {
|
493
|
+
},
|
494
|
+
receiveSynchronisedEvent: async function(e) {
|
495
|
+
if (e.paneIndex !== this.entry.id)
|
496
|
+
e.eventType == "panZoom" || this.handleSyncMouseEvent(e);
|
497
|
+
else if (e.eventType == "selected") {
|
498
|
+
let t = await this.getNameAndIdFromSyncData(e);
|
499
|
+
this.zoomToFeatures(t, !1);
|
500
|
+
}
|
501
|
+
},
|
502
|
+
requestSynchronisedEvent: function() {
|
503
|
+
},
|
504
|
+
flatmapMarkerUpdate() {
|
505
|
+
},
|
506
|
+
onResize: function() {
|
507
|
+
},
|
508
|
+
startHelp: function() {
|
509
|
+
this.isInHelp === !1 && (this.helpMode = !0, window.addEventListener("mousedown", this.checkEndHelpMouseDown), this.isInHelp = !0);
|
510
|
+
},
|
511
|
+
endHelp: function() {
|
512
|
+
window.removeEventListener("mousedown", this.checkEndHelpMouseDown), this.helpMode = !1, setTimeout(() => {
|
513
|
+
this.isInHelp = !1;
|
514
|
+
}, 200);
|
515
|
+
},
|
516
|
+
onHelpModeShowNext: function() {
|
517
|
+
this.helpModeActiveItem += 1;
|
518
|
+
},
|
519
|
+
onHelpModeLastItem: function(e) {
|
520
|
+
e && (this.helpModeLastItem = !0);
|
521
|
+
},
|
522
|
+
onFinishHelpMode: function() {
|
523
|
+
this.helpMode = !1, this.helpModeActiveItem = 0, this.helpModeLastItem = !1;
|
524
|
+
},
|
525
|
+
onTooltipShown: function() {
|
526
|
+
this.$refs.multiflatmap && this.$refs.multiflatmapHelp && this.$refs.multiflatmapHelp.toggleTooltipHighlight(), this.$refs.flatmap && this.$refs.flatmapHelp && this.$refs.flatmapHelp.toggleTooltipHighlight(), this.$refs.scaffold && this.$refs.scaffoldHelp && this.$refs.scaffoldHelp.toggleTooltipHighlight();
|
527
|
+
},
|
528
|
+
onMapTooltipShown: function() {
|
529
|
+
this.$refs.multiflatmap && this.$refs.multiflatmapHelp && this.$refs.multiflatmapHelp.toggleTooltipPinHighlight(), this.$refs.flatmap && this.$refs.flatmapHelp && this.$refs.flatmapHelp.toggleTooltipPinHighlight(), this.$refs.scaffold && this.$refs.scaffoldHelp && this.$refs.scaffoldHelp.toggleTooltipPinHighlight();
|
530
|
+
},
|
531
|
+
/**
|
532
|
+
* End help-mode only if user clicks outside of help mode dialog.
|
533
|
+
*/
|
534
|
+
checkEndHelpMouseDown: function(e) {
|
535
|
+
e.target.closest(".help-mode-dialog") || this.endHelp();
|
536
|
+
},
|
537
|
+
mapHoverHighlight: function(e) {
|
538
|
+
if (this.visible) {
|
539
|
+
const t = this.settingsStore.hoverAnatomies, i = this.settingsStore.hoverOrgans;
|
540
|
+
t.length || i.length ? (clearTimeout(this.hoverDelay), this.multiflatmapRef || this.flatmapRef ? e == null || e.zoomToFeatures(t, { noZoomIn: !0 }) : this.scaffoldRef && (e == null || e.changeHighlightedByName(i, "", !1))) : this.hoverDelay = setTimeout(() => {
|
541
|
+
this.multiflatmapRef || this.flatmapRef ? e == null || e.clearSearchResults() : this.scaffoldRef && (e == null || e.changeHighlightedByName(i, "", !1));
|
542
|
+
}, 500);
|
543
|
+
}
|
544
|
+
},
|
545
|
+
onConnectivityInfoOpen: function(e) {
|
546
|
+
l.emit("connectivity-info-open", e);
|
547
|
+
},
|
548
|
+
onConnectivityInfoClose: function() {
|
549
|
+
l.emit("connectivity-info-close");
|
550
|
+
}
|
551
|
+
},
|
552
|
+
data: function() {
|
553
|
+
return {
|
554
|
+
apiLocation: void 0,
|
555
|
+
activeSpecies: "Rat",
|
556
|
+
scaffoldCamera: void 0,
|
557
|
+
mainStyle: {
|
558
|
+
height: this.entry.datasetTitle ? "calc(100% - 30px)" : "100%",
|
559
|
+
width: "100%",
|
560
|
+
bottom: "0px"
|
561
|
+
},
|
562
|
+
helpMode: !1,
|
563
|
+
helpModeActiveItem: 0,
|
564
|
+
helpModeLastItem: !1,
|
565
|
+
multiflatmapRef: null,
|
566
|
+
flatmapRef: null,
|
567
|
+
scaffoldRef: null,
|
568
|
+
scaffoldLoaded: !1,
|
569
|
+
isInHelp: !1,
|
570
|
+
hoverDelay: void 0
|
571
|
+
};
|
572
|
+
},
|
573
|
+
created: function() {
|
574
|
+
this.flatmapAPI = void 0, this.apiLocation = void 0, this.settingsStore.flatmapAPI && (this.flatmapAPI = this.settingsStore.flatmapAPI), this.settingsStore.sparcApi && (this.apiLocation = this.settingsStore.sparcApi);
|
575
|
+
},
|
576
|
+
watch: {
|
577
|
+
helpMode: function(e) {
|
578
|
+
e || (this.helpModeActiveItem = 0);
|
579
|
+
}
|
580
|
+
}
|
581
|
+
};
|
582
|
+
export {
|
583
|
+
U as C
|
584
|
+
};
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { _ as d, t as h, T as s, E as l } from "./index-
|
2
|
-
import { C as u } from "./ContentMixin-
|
3
|
-
import { D as I, W as y } from "./style-
|
4
|
-
import { F as
|
5
|
-
import { resolveComponent as p, openBlock as r, createElementBlock as
|
1
|
+
import { _ as d, t as h, T as s, E as l } from "./index-BQV8-ab4.js";
|
2
|
+
import { C as u } from "./ContentMixin-DFsTunqU.js";
|
3
|
+
import { D as I, W as y } from "./style-wUZezVCf.js";
|
4
|
+
import { F as g } from "./style-CJykSWTR.js";
|
5
|
+
import { resolveComponent as p, openBlock as r, createElementBlock as M, createVNode as v, createBlock as S, createCommentVNode as C } from "vue";
|
6
6
|
const F = {
|
7
7
|
name: "Flatmap",
|
8
8
|
mixins: [u, I],
|
9
9
|
components: {
|
10
10
|
FlatmapVuer: y,
|
11
|
-
HelpModeDialog:
|
11
|
+
HelpModeDialog: g
|
12
12
|
},
|
13
13
|
methods: {
|
14
14
|
getState: function() {
|
@@ -47,7 +47,7 @@ const F = {
|
|
47
47
|
},
|
48
48
|
flatmapReadyCall: function(e) {
|
49
49
|
let t = { id: this.entry.id, prov: this.getFlatmapImp().provenance };
|
50
|
-
l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.
|
50
|
+
l.emit("mapImpProv", t), this.$emit("flatmap-provenance-ready", t), this.entry.resource === "FunctionalConnectivity" && this.flatmapReadyForMarkerUpdates(e);
|
51
51
|
},
|
52
52
|
onPathwaySelectionChanged: function(e) {
|
53
53
|
const { label: t, property: o, checked: a, selectionsTitle: n } = e;
|
@@ -88,6 +88,9 @@ const F = {
|
|
88
88
|
}
|
89
89
|
} else
|
90
90
|
a.clearSearchResults();
|
91
|
+
},
|
92
|
+
changeViewingMode: function(e) {
|
93
|
+
this.$refs.flatmap.mapImp.changeViewingMode(e);
|
91
94
|
}
|
92
95
|
},
|
93
96
|
computed: {
|
@@ -96,7 +99,7 @@ const F = {
|
|
96
99
|
}
|
97
100
|
},
|
98
101
|
mounted: function() {
|
99
|
-
|
102
|
+
l.on("markerUpdate", () => {
|
100
103
|
this.flatmapMarkerUpdate(void 0);
|
101
104
|
}), l.on("hoverUpdate", () => {
|
102
105
|
this.mapHoverHighlight(this.$refs.flatmap.mapImp);
|
@@ -109,10 +112,10 @@ const F = {
|
|
109
112
|
});
|
110
113
|
}
|
111
114
|
}, w = { class: "viewer-container" };
|
112
|
-
function
|
115
|
+
function H(e, t, o, a, n, i) {
|
113
116
|
const m = p("FlatmapVuer"), f = p("HelpModeDialog");
|
114
|
-
return r(),
|
115
|
-
|
117
|
+
return r(), M("div", w, [
|
118
|
+
v(m, {
|
116
119
|
state: e.entry.state,
|
117
120
|
entry: e.entry.resource,
|
118
121
|
onResourceSelected: t[0] || (t[0] = (c) => i.flatmaprResourceSelected(e.entry.type, c)),
|
@@ -151,7 +154,7 @@ function b(e, t, o, a, n, i) {
|
|
151
154
|
}, null, 8, ["flatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : C("", !0)
|
152
155
|
]);
|
153
156
|
}
|
154
|
-
const
|
157
|
+
const T = /* @__PURE__ */ d(F, [["render", H], ["__scopeId", "data-v-4edaed6d"]]);
|
155
158
|
export {
|
156
|
-
|
159
|
+
T as default
|
157
160
|
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { C as r } from "./ContentMixin-
|
1
|
+
import { C as r } from "./ContentMixin-DFsTunqU.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-BQV8-ab4.js";
|
4
4
|
const a = {
|
5
5
|
name: "Iframe",
|
6
6
|
mixins: [r]
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as u, a as h, g as y, E as r, t as g, T as p } from "./index-
|
2
|
-
import { C as M } from "./ContentMixin-
|
3
|
-
import { D as v, v as I } from "./style-
|
1
|
+
import { _ as u, a as h, g as y, E as r, t as g, T as p } from "./index-BQV8-ab4.js";
|
2
|
+
import { C as M } from "./ContentMixin-DFsTunqU.js";
|
3
|
+
import { D as v, v as I } from "./style-wUZezVCf.js";
|
4
4
|
import { F as S } from "./style-CJykSWTR.js";
|
5
5
|
import { resolveComponent as f, openBlock as c, createElementBlock as C, createVNode as F, createBlock as k, createCommentVNode as w } from "vue";
|
6
6
|
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) => {
|
@@ -243,6 +243,12 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
243
243
|
}), !0;
|
244
244
|
}
|
245
245
|
return !1;
|
246
|
+
},
|
247
|
+
/**
|
248
|
+
* Change the view mode of the current flatmap
|
249
|
+
*/
|
250
|
+
changeViewingMode: function(e) {
|
251
|
+
this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e);
|
246
252
|
}
|
247
253
|
},
|
248
254
|
computed: {
|
@@ -262,7 +268,7 @@ const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><pa
|
|
262
268
|
}
|
263
269
|
},
|
264
270
|
mounted: function() {
|
265
|
-
this.
|
271
|
+
this.getFeaturedDatasets(), r.on("show-connectivity", (e) => {
|
266
272
|
const { featureIds: t, offset: a } = e;
|
267
273
|
if (this.flatmapReady && this.$refs.multiflatmap) {
|
268
274
|
const n = this.$refs.multiflatmap.getCurrentFlatmap();
|
@@ -321,7 +327,7 @@ function P(e, t, a, n, o, i) {
|
|
321
327
|
}, null, 8, ["multiflatmapRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : w("", !0)
|
322
328
|
]);
|
323
329
|
}
|
324
|
-
const
|
330
|
+
const _ = /* @__PURE__ */ u(b, [["render", P], ["__scopeId", "data-v-923b6a8c"]]);
|
325
331
|
export {
|
326
|
-
|
332
|
+
_ as default
|
327
333
|
};
|