@abi-software/flatmapvuer 0.5.9-beta.0 → 0.5.9-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/flatmapvuer.common.js +368 -240
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +368 -240
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +2 -2
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +4366 -340
- package/package.json +3 -2
- package/src/App.vue +2 -1
- package/src/components/AnnotationTool.vue +154 -95
- package/src/components/FlatmapVuer.vue +368 -246
- package/src/components/ProvenancePopup.vue +0 -3
- package/src/components/Tooltip.vue +2 -2
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
element-loading-background="rgba(0, 0, 0, 0.3)"
|
|
9
9
|
>
|
|
10
10
|
<map-svg-sprite-color />
|
|
11
|
-
<div
|
|
12
|
-
|
|
11
|
+
<div
|
|
12
|
+
style="height: 100%; width: 100%; position: relative; overflow-y: none"
|
|
13
|
+
>
|
|
14
|
+
<div style="height: 100%; width: 100%" ref="display"></div>
|
|
13
15
|
<div class="beta-popovers">
|
|
14
16
|
<div>
|
|
15
17
|
<el-popover
|
|
@@ -20,32 +22,52 @@
|
|
|
20
22
|
v-model="hoverVisibilities[6].value"
|
|
21
23
|
ref="warningPopover"
|
|
22
24
|
>
|
|
23
|
-
<p
|
|
24
|
-
|
|
25
|
+
<p
|
|
26
|
+
v-if="isLegacy"
|
|
27
|
+
@mouseover="showToolitip(6)"
|
|
28
|
+
@mouseout="hideToolitip(6)"
|
|
29
|
+
>
|
|
30
|
+
This is a legacy map, you may view the latest map instead.
|
|
25
31
|
</p>
|
|
26
|
-
<p
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
<p
|
|
33
|
+
v-else-if="isFC"
|
|
34
|
+
@mouseover="showToolitip(6)"
|
|
35
|
+
@mouseout="hideToolitip(6)"
|
|
36
|
+
>
|
|
37
|
+
This map displays the connectivity of individual neurons.
|
|
38
|
+
Specifically, those which align with (parts of) the neuron
|
|
39
|
+
populations from the
|
|
40
|
+
<a
|
|
41
|
+
href="https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew"
|
|
42
|
+
target="_blank"
|
|
43
|
+
>
|
|
44
|
+
ApiNATOMY
|
|
32
45
|
</a>
|
|
33
|
-
models available in
|
|
34
|
-
<a
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
models available in
|
|
47
|
+
<a
|
|
48
|
+
href="https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD"
|
|
49
|
+
target="_blank"
|
|
50
|
+
>
|
|
51
|
+
SCKAN </a
|
|
52
|
+
>.
|
|
37
53
|
</p>
|
|
38
54
|
<p v-else @mouseover="showToolitip(6)" @mouseout="hideToolitip(6)">
|
|
39
|
-
This map displays the connectivity of neuron populations.
|
|
40
|
-
Specifically, those from the primarily rat-based
|
|
41
|
-
<a
|
|
42
|
-
|
|
55
|
+
This map displays the connectivity of neuron populations.
|
|
56
|
+
Specifically, those from the primarily rat-based
|
|
57
|
+
<a
|
|
58
|
+
href="https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew"
|
|
59
|
+
target="_blank"
|
|
60
|
+
>
|
|
61
|
+
ApiNATOMY
|
|
43
62
|
</a>
|
|
44
|
-
models available in
|
|
45
|
-
<a
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
models available in
|
|
64
|
+
<a
|
|
65
|
+
href="https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD"
|
|
66
|
+
target="_blank"
|
|
67
|
+
>
|
|
68
|
+
SCKAN </a
|
|
69
|
+
>. New connectivity and species specificity will be added as the
|
|
70
|
+
SPARC program progresses.
|
|
49
71
|
</p>
|
|
50
72
|
</el-popover>
|
|
51
73
|
<i
|
|
@@ -57,12 +79,14 @@
|
|
|
57
79
|
>
|
|
58
80
|
<template v-if="isLegacy">
|
|
59
81
|
<span class="warning-text">Legacy Map</span>
|
|
60
|
-
<div class="latest-map-text" @click="viewLatestMap">
|
|
82
|
+
<div class="latest-map-text" @click="viewLatestMap">
|
|
83
|
+
Click here for the latest map
|
|
84
|
+
</div>
|
|
61
85
|
</template>
|
|
62
86
|
<template v-else>
|
|
63
87
|
<span class="warning-text">Beta</span>
|
|
64
88
|
</template>
|
|
65
|
-
|
|
89
|
+
</i>
|
|
66
90
|
</div>
|
|
67
91
|
<el-popover
|
|
68
92
|
:content="latestChangesMessage"
|
|
@@ -84,9 +108,15 @@
|
|
|
84
108
|
<span class="warning-text">What's new?</span>
|
|
85
109
|
</i>
|
|
86
110
|
</div>
|
|
87
|
-
|
|
111
|
+
|
|
88
112
|
<!-- The element below is placed onto the flatmap when it is ready -->
|
|
89
|
-
<i
|
|
113
|
+
<i
|
|
114
|
+
class="el-icon-arrow-down minimap-resize"
|
|
115
|
+
:class="{ enlarge: minimapSmall, shrink: !minimapSmall }"
|
|
116
|
+
ref="minimapResize"
|
|
117
|
+
v-show="minimapResizeShow"
|
|
118
|
+
@click="closeMinimap"
|
|
119
|
+
></i>
|
|
90
120
|
|
|
91
121
|
<div class="bottom-right-control">
|
|
92
122
|
<el-popover
|
|
@@ -133,7 +163,7 @@
|
|
|
133
163
|
>
|
|
134
164
|
<div>
|
|
135
165
|
Fit to
|
|
136
|
-
<br
|
|
166
|
+
<br />
|
|
137
167
|
window
|
|
138
168
|
</div>
|
|
139
169
|
<map-svg-icon
|
|
@@ -155,14 +185,18 @@
|
|
|
155
185
|
v-model="hoverVisibilities[4].value"
|
|
156
186
|
ref="checkBoxPopover"
|
|
157
187
|
/>
|
|
158
|
-
<div
|
|
188
|
+
<div
|
|
189
|
+
class="pathway-location"
|
|
190
|
+
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
191
|
+
>
|
|
159
192
|
<div
|
|
160
193
|
class="pathway-container"
|
|
161
|
-
:
|
|
194
|
+
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
195
|
+
:style="{ 'max-height' : pathwaysMaxHeight + 'px' }"
|
|
162
196
|
v-if="pathControls"
|
|
163
197
|
v-popover:checkBoxPopover
|
|
164
198
|
>
|
|
165
|
-
<svg-legends v-if="!isFC" class="svg-legends-container"/>
|
|
199
|
+
<svg-legends v-if="!isFC" class="svg-legends-container" />
|
|
166
200
|
<el-popover
|
|
167
201
|
content="Find these markers for data"
|
|
168
202
|
placement="right"
|
|
@@ -263,12 +297,8 @@
|
|
|
263
297
|
popper-class="open-map-popper non-selectable"
|
|
264
298
|
>
|
|
265
299
|
<el-row v-for="item in openMapOptions" :key="item.key">
|
|
266
|
-
<el-button
|
|
267
|
-
|
|
268
|
-
plain
|
|
269
|
-
@click="$emit('open-map', item.key)"
|
|
270
|
-
>
|
|
271
|
-
{{item.display}}
|
|
300
|
+
<el-button type="primary" plain @click="$emit('open-map', item.key)">
|
|
301
|
+
{{ item.display }}
|
|
272
302
|
</el-button>
|
|
273
303
|
</el-row>
|
|
274
304
|
</el-popover>
|
|
@@ -281,7 +311,6 @@
|
|
|
281
311
|
popper-class="background-popper"
|
|
282
312
|
>
|
|
283
313
|
<el-row class="backgroundText">Viewing Mode</el-row>
|
|
284
|
-
|
|
285
314
|
<el-row class="backgroundControl">
|
|
286
315
|
<el-select
|
|
287
316
|
:popper-append-to-body="false"
|
|
@@ -290,7 +319,12 @@
|
|
|
290
319
|
class="select-box"
|
|
291
320
|
popper-class="flatmap_dropdown"
|
|
292
321
|
>
|
|
293
|
-
<el-option
|
|
322
|
+
<el-option
|
|
323
|
+
v-for="item in viewingModes"
|
|
324
|
+
:key="item"
|
|
325
|
+
:label="item"
|
|
326
|
+
:value="item"
|
|
327
|
+
>
|
|
294
328
|
<el-row>
|
|
295
329
|
<el-col :span="12">{{ item }}</el-col>
|
|
296
330
|
</el-row>
|
|
@@ -300,7 +334,11 @@
|
|
|
300
334
|
<el-row class="backgroundSpacer"></el-row>
|
|
301
335
|
<el-row class="backgroundText">Organs display</el-row>
|
|
302
336
|
<el-row class="backgroundControl">
|
|
303
|
-
<el-radio-group
|
|
337
|
+
<el-radio-group
|
|
338
|
+
v-model="colourRadio"
|
|
339
|
+
class="flatmap-radio"
|
|
340
|
+
@change="setColour"
|
|
341
|
+
>
|
|
304
342
|
<el-radio :label="true">Colour</el-radio>
|
|
305
343
|
<el-radio :label="false">Greyscale</el-radio>
|
|
306
344
|
</el-radio-group>
|
|
@@ -308,7 +346,11 @@
|
|
|
308
346
|
<el-row class="backgroundSpacer"></el-row>
|
|
309
347
|
<el-row class="backgroundText">Outlines display</el-row>
|
|
310
348
|
<el-row class="backgroundControl">
|
|
311
|
-
<el-radio-group
|
|
349
|
+
<el-radio-group
|
|
350
|
+
v-model="outlinesRadio"
|
|
351
|
+
class="flatmap-radio"
|
|
352
|
+
@change="setOutlines"
|
|
353
|
+
>
|
|
312
354
|
<el-radio :label="true">Show</el-radio>
|
|
313
355
|
<el-radio :label="false">Hide</el-radio>
|
|
314
356
|
</el-radio-group>
|
|
@@ -319,7 +361,11 @@
|
|
|
319
361
|
<div
|
|
320
362
|
v-for="item in availableBackground"
|
|
321
363
|
:key="item"
|
|
322
|
-
:class="[
|
|
364
|
+
:class="[
|
|
365
|
+
'backgroundChoice',
|
|
366
|
+
item,
|
|
367
|
+
item == currentBackground ? 'active' : '',
|
|
368
|
+
]"
|
|
323
369
|
@click="backgroundChangeCallback(item)"
|
|
324
370
|
/>
|
|
325
371
|
</el-row>
|
|
@@ -372,6 +418,7 @@
|
|
|
372
418
|
ref="tooltip"
|
|
373
419
|
class="tooltip"
|
|
374
420
|
:annotationEntry="annotationEntry"
|
|
421
|
+
@onClose="closeTooltip"
|
|
375
422
|
:entry="tooltipEntry"
|
|
376
423
|
:annotationDisplay="viewingMode === 'Annotation'"
|
|
377
424
|
/>
|
|
@@ -399,7 +446,10 @@ import {
|
|
|
399
446
|
import lang from "element-ui/lib/locale/lang/en";
|
|
400
447
|
import locale from "element-ui/lib/locale";
|
|
401
448
|
import flatmapMarker from "../icons/flatmap-marker";
|
|
402
|
-
import {
|
|
449
|
+
import {
|
|
450
|
+
FlatmapQueries,
|
|
451
|
+
findTaxonomyLabel,
|
|
452
|
+
} from "../services/flatmapQueries.js";
|
|
403
453
|
|
|
404
454
|
locale.use(lang);
|
|
405
455
|
Vue.use(Button);
|
|
@@ -413,25 +463,27 @@ const ResizeSensor = require("css-element-queries/src/ResizeSensor");
|
|
|
413
463
|
|
|
414
464
|
const processTaxon = (flatmapAPI, taxonIdentifiers) => {
|
|
415
465
|
let processed = [];
|
|
416
|
-
taxonIdentifiers.forEach(taxon => {
|
|
417
|
-
findTaxonomyLabel(flatmapAPI, taxon).then(value => {
|
|
418
|
-
const item = { taxon, label: value};
|
|
466
|
+
taxonIdentifiers.forEach((taxon) => {
|
|
467
|
+
findTaxonomyLabel(flatmapAPI, taxon).then((value) => {
|
|
468
|
+
const item = { taxon, label: value };
|
|
419
469
|
processed.push(item);
|
|
420
470
|
});
|
|
421
471
|
});
|
|
422
472
|
|
|
423
473
|
return processed;
|
|
424
|
-
}
|
|
474
|
+
};
|
|
425
475
|
|
|
426
476
|
const processFTUs = (parent, key) => {
|
|
427
477
|
const ftus = [];
|
|
428
478
|
let items = parent.organs ? parent.organs : parent.ftus;
|
|
429
|
-
const children = items
|
|
430
|
-
(
|
|
431
|
-
|
|
432
|
-
|
|
479
|
+
const children = items
|
|
480
|
+
? items.filter(
|
|
481
|
+
(obj, index) =>
|
|
482
|
+
items.findIndex((item) => item.label === obj.label) === index
|
|
483
|
+
)
|
|
484
|
+
: undefined;
|
|
433
485
|
if (children) {
|
|
434
|
-
children.forEach(child => {
|
|
486
|
+
children.forEach((child) => {
|
|
435
487
|
const data = {
|
|
436
488
|
label: child.label,
|
|
437
489
|
models: child.models,
|
|
@@ -442,16 +494,16 @@ const processFTUs = (parent, key) => {
|
|
|
442
494
|
data.children = grandChildren;
|
|
443
495
|
}
|
|
444
496
|
ftus.push(data);
|
|
445
|
-
})
|
|
497
|
+
});
|
|
446
498
|
}
|
|
447
499
|
return ftus;
|
|
448
|
-
}
|
|
500
|
+
};
|
|
449
501
|
|
|
450
|
-
const processSystems = systems => {
|
|
502
|
+
const processSystems = (systems) => {
|
|
451
503
|
const allSystems = [];
|
|
452
504
|
if (systems && systems.length > 0) {
|
|
453
505
|
const data = { label: "All", key: "All", children: [] };
|
|
454
|
-
systems.forEach(system => {
|
|
506
|
+
systems.forEach((system) => {
|
|
455
507
|
const child = {
|
|
456
508
|
colour: system.colour,
|
|
457
509
|
enabled: system.enabled,
|
|
@@ -459,18 +511,17 @@ const processSystems = systems => {
|
|
|
459
511
|
key: system.id,
|
|
460
512
|
};
|
|
461
513
|
const children = processFTUs(system, child.key);
|
|
462
|
-
if (children.length > 0)
|
|
463
|
-
child.children = children;
|
|
514
|
+
if (children.length > 0) child.children = children;
|
|
464
515
|
data.children.push(child);
|
|
465
516
|
});
|
|
466
517
|
|
|
467
518
|
allSystems.push(data);
|
|
468
519
|
}
|
|
469
|
-
|
|
520
|
+
|
|
470
521
|
return allSystems;
|
|
471
|
-
}
|
|
522
|
+
};
|
|
472
523
|
|
|
473
|
-
const createUnfilledTooltipData = function (){
|
|
524
|
+
const createUnfilledTooltipData = function () {
|
|
474
525
|
return {
|
|
475
526
|
destinations: [],
|
|
476
527
|
origins: [],
|
|
@@ -478,9 +529,9 @@ const createUnfilledTooltipData = function (){
|
|
|
478
529
|
destinationsWithDatasets: [],
|
|
479
530
|
originsWithDatasets: [],
|
|
480
531
|
componentsWithDatasets: [],
|
|
481
|
-
resource: undefined
|
|
482
|
-
}
|
|
483
|
-
}
|
|
532
|
+
resource: undefined,
|
|
533
|
+
};
|
|
534
|
+
};
|
|
484
535
|
|
|
485
536
|
export default {
|
|
486
537
|
name: "FlatmapVuer",
|
|
@@ -490,9 +541,9 @@ export default {
|
|
|
490
541
|
Tooltip,
|
|
491
542
|
TreeControls,
|
|
492
543
|
SelectionsGroup,
|
|
493
|
-
SvgLegends
|
|
544
|
+
SvgLegends,
|
|
494
545
|
},
|
|
495
|
-
beforeCreate: function() {
|
|
546
|
+
beforeCreate: function () {
|
|
496
547
|
this.mapManager = undefined;
|
|
497
548
|
this.mapImp = undefined;
|
|
498
549
|
//The state watcher may triggered before
|
|
@@ -501,7 +552,7 @@ export default {
|
|
|
501
552
|
this.setStateRequired = false;
|
|
502
553
|
},
|
|
503
554
|
methods: {
|
|
504
|
-
viewLatestMap: function() {
|
|
555
|
+
viewLatestMap: function () {
|
|
505
556
|
let biologicalSex = this.biologicalSex ? this.biologicalSex : undefined;
|
|
506
557
|
//Human requires special handling
|
|
507
558
|
if (this.entry === "NCBITaxon:9606") {
|
|
@@ -510,23 +561,23 @@ export default {
|
|
|
510
561
|
const state = {
|
|
511
562
|
entry: this.entry,
|
|
512
563
|
biologicalSex,
|
|
513
|
-
viewport: this.mapImp.getState()
|
|
564
|
+
viewport: this.mapImp.getState(),
|
|
514
565
|
};
|
|
515
566
|
this.$emit("view-latest-map", state);
|
|
516
567
|
},
|
|
517
|
-
backgroundChangeCallback: function(colour) {
|
|
568
|
+
backgroundChangeCallback: function (colour) {
|
|
518
569
|
this.currentBackground = colour;
|
|
519
570
|
if (this.mapImp) {
|
|
520
571
|
this.mapImp.setBackgroundColour(this.currentBackground, 1);
|
|
521
572
|
}
|
|
522
573
|
},
|
|
523
|
-
toggleDrawer: function() {
|
|
574
|
+
toggleDrawer: function () {
|
|
524
575
|
this.drawerOpen = !this.drawerOpen;
|
|
525
576
|
},
|
|
526
577
|
/**
|
|
527
578
|
* Function to toggle colour/greyscale of organs.
|
|
528
579
|
*/
|
|
529
|
-
setColour: function(flag) {
|
|
580
|
+
setColour: function (flag) {
|
|
530
581
|
this.colourRadio = flag;
|
|
531
582
|
if (this.mapImp) {
|
|
532
583
|
this.mapImp.setColour({ colour: flag, outline: this.outlinesRadio });
|
|
@@ -535,7 +586,7 @@ export default {
|
|
|
535
586
|
/**
|
|
536
587
|
* Function to toggle outlines f organs.
|
|
537
588
|
*/
|
|
538
|
-
setOutlines: function(flag) {
|
|
589
|
+
setOutlines: function (flag) {
|
|
539
590
|
this.outlineRadio = flag;
|
|
540
591
|
if (this.mapImp) {
|
|
541
592
|
this.mapImp.setColour({ colour: this.colourRadio, outline: flag });
|
|
@@ -545,7 +596,7 @@ export default {
|
|
|
545
596
|
* Function to toggle paths to default.
|
|
546
597
|
* Also called when the associated button is pressed.
|
|
547
598
|
*/
|
|
548
|
-
resetView: function() {
|
|
599
|
+
resetView: function () {
|
|
549
600
|
if (this.mapImp) {
|
|
550
601
|
this.mapImp.resetMap();
|
|
551
602
|
if (this.$refs.centrelinesSelection) {
|
|
@@ -569,7 +620,7 @@ export default {
|
|
|
569
620
|
* Function to zoom in.
|
|
570
621
|
* Also called when the associated button is pressed.
|
|
571
622
|
*/
|
|
572
|
-
zoomIn: function() {
|
|
623
|
+
zoomIn: function () {
|
|
573
624
|
if (this.mapImp) {
|
|
574
625
|
this.mapImp.zoomIn();
|
|
575
626
|
}
|
|
@@ -578,73 +629,98 @@ export default {
|
|
|
578
629
|
* Function to zoom out.
|
|
579
630
|
* Also called when the associated button is pressed.
|
|
580
631
|
*/
|
|
581
|
-
zoomOut: function() {
|
|
632
|
+
zoomOut: function () {
|
|
582
633
|
if (this.mapImp) {
|
|
583
634
|
this.mapImp.zoomOut();
|
|
584
635
|
}
|
|
585
636
|
},
|
|
586
|
-
centreLinesSelected: function(payload) {
|
|
637
|
+
centreLinesSelected: function (payload) {
|
|
587
638
|
if (this.mapImp) {
|
|
588
639
|
this.mapImp.enableCentrelines(payload.value);
|
|
589
640
|
}
|
|
590
641
|
},
|
|
591
|
-
sckanSelected: function(payload) {
|
|
642
|
+
sckanSelected: function (payload) {
|
|
592
643
|
if (this.mapImp) {
|
|
593
644
|
this.mapImp.enableSckanPath(payload.key, payload.value);
|
|
594
645
|
}
|
|
595
646
|
},
|
|
596
|
-
checkAllSCKAN: function(payload) {
|
|
647
|
+
checkAllSCKAN: function (payload) {
|
|
648
|
+
if (this.mapImp) {
|
|
649
|
+
payload.keys.forEach((key) =>
|
|
650
|
+
this.mapImp.enableSckanPath(key, payload.value));
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
highlightConnectedPaths: function (payload) {
|
|
597
654
|
if (this.mapImp) {
|
|
598
|
-
|
|
655
|
+
let paths = [...this.mapImp.pathModelNodes(payload)];
|
|
656
|
+
// The line below matches the paths to the annIdToFeatureId map to get the feature ids
|
|
657
|
+
|
|
658
|
+
let pathFeatures = paths.map(p=>this.mapImp.featureProperties(p));
|
|
659
|
+
let toHighlight = [];
|
|
660
|
+
pathFeatures.forEach(p=>{
|
|
661
|
+
this.mapImp.nodePathModels(p.featureId).forEach(f=>{
|
|
662
|
+
toHighlight.push(f);
|
|
663
|
+
})
|
|
664
|
+
})
|
|
665
|
+
// display connected paths
|
|
666
|
+
this.mapImp.zoomToFeatures(toHighlight, {noZoomIn: true});
|
|
599
667
|
}
|
|
600
668
|
},
|
|
601
|
-
systemSelected: function(payload) {
|
|
669
|
+
systemSelected: function (payload) {
|
|
602
670
|
if (this.mapImp) {
|
|
603
671
|
this.mapImp.enableSystem(payload.key, payload.value);
|
|
604
672
|
}
|
|
605
673
|
},
|
|
606
|
-
checkAllSystems: function(flag) {
|
|
674
|
+
checkAllSystems: function (flag) {
|
|
607
675
|
if (this.mapImp) {
|
|
608
|
-
this.systems[0].children.forEach(key =>
|
|
676
|
+
this.systems[0].children.forEach((key) =>
|
|
677
|
+
this.mapImp.enableSystem(key.label, flag)
|
|
678
|
+
);
|
|
609
679
|
}
|
|
610
680
|
},
|
|
611
|
-
ftuSelected: function(models) {
|
|
681
|
+
ftuSelected: function (models) {
|
|
612
682
|
this.searchAndShowResult(models, true);
|
|
613
683
|
},
|
|
614
|
-
layersSelected: function(payload) {
|
|
684
|
+
layersSelected: function (payload) {
|
|
615
685
|
if (this.mapImp) {
|
|
616
686
|
this.mapImp.enableLayer(payload.key, payload.value);
|
|
617
687
|
}
|
|
618
688
|
},
|
|
619
|
-
checkAllLayers: function(payload) {
|
|
689
|
+
checkAllLayers: function (payload) {
|
|
620
690
|
if (this.mapImp) {
|
|
621
|
-
payload.keys.forEach(key =>
|
|
691
|
+
payload.keys.forEach((key) =>
|
|
692
|
+
this.mapImp.enableLayer(key, payload.value)
|
|
693
|
+
);
|
|
622
694
|
}
|
|
623
695
|
},
|
|
624
|
-
taxonsSelected: function(payload) {
|
|
696
|
+
taxonsSelected: function (payload) {
|
|
625
697
|
if (this.mapImp) {
|
|
626
698
|
this.mapImp.enableConnectivityByTaxonIds(payload.key, payload.value);
|
|
627
699
|
}
|
|
628
700
|
},
|
|
629
|
-
checkAllTaxons: function(payload) {
|
|
701
|
+
checkAllTaxons: function (payload) {
|
|
630
702
|
if (this.mapImp) {
|
|
631
|
-
payload.keys.forEach(key =>
|
|
703
|
+
payload.keys.forEach((key) =>
|
|
704
|
+
this.mapImp.enableConnectivityByTaxonIds(key, payload.value)
|
|
705
|
+
);
|
|
632
706
|
}
|
|
633
707
|
},
|
|
634
|
-
pathwaysSelected: function(payload) {
|
|
708
|
+
pathwaysSelected: function (payload) {
|
|
635
709
|
if (this.mapImp) {
|
|
636
710
|
this.mapImp.enablePath(payload.key, payload.value);
|
|
637
711
|
}
|
|
638
712
|
},
|
|
639
|
-
checkAllPathways: function(payload) {
|
|
713
|
+
checkAllPathways: function (payload) {
|
|
640
714
|
if (this.mapImp) {
|
|
641
|
-
payload.keys.forEach(key =>
|
|
715
|
+
payload.keys.forEach((key) =>
|
|
716
|
+
this.mapImp.enablePath(key, payload.value)
|
|
717
|
+
);
|
|
642
718
|
}
|
|
643
719
|
},
|
|
644
|
-
enablePanZoomEvents: function(flag) {
|
|
720
|
+
enablePanZoomEvents: function (flag) {
|
|
645
721
|
this.mapImp.enablePanZoomEvents(flag);
|
|
646
722
|
},
|
|
647
|
-
eventCallback: function() {
|
|
723
|
+
eventCallback: function () {
|
|
648
724
|
return (eventType, data, ...args) => {
|
|
649
725
|
if (eventType !== "pan-zoom") {
|
|
650
726
|
const label = data.label;
|
|
@@ -660,14 +736,26 @@ export default {
|
|
|
660
736
|
feature: data,
|
|
661
737
|
userData: args,
|
|
662
738
|
eventType: eventType,
|
|
663
|
-
provenanceTaxonomy: data.taxons
|
|
739
|
+
provenanceTaxonomy: data.taxons
|
|
740
|
+
? JSON.parse(data.taxons)
|
|
741
|
+
: undefined,
|
|
664
742
|
};
|
|
665
743
|
if (eventType === "click") {
|
|
666
|
-
this.
|
|
667
|
-
|
|
744
|
+
if (this.viewingMode === "Network Discovery") {
|
|
745
|
+
this.highlightConnectedPaths([data.models]);
|
|
746
|
+
} else {
|
|
747
|
+
this.currentActive = data.models ? data.models : "";
|
|
748
|
+
}
|
|
749
|
+
} else if (eventType === "mouseenter" &&
|
|
750
|
+
!(this.viewingMode === "Network Discovery")) {
|
|
668
751
|
this.currentHover = data.models ? data.models : "";
|
|
669
752
|
}
|
|
670
|
-
if (
|
|
753
|
+
if (
|
|
754
|
+
data &&
|
|
755
|
+
data.type !== "marker" &&
|
|
756
|
+
eventType === "click" &&
|
|
757
|
+
!(this.viewingMode === "Network Discovery")
|
|
758
|
+
) {
|
|
671
759
|
this.checkAndCreatePopups(payload);
|
|
672
760
|
}
|
|
673
761
|
this.$emit("resource-selected", payload);
|
|
@@ -677,26 +765,32 @@ export default {
|
|
|
677
765
|
};
|
|
678
766
|
},
|
|
679
767
|
// checkNeuronClicked shows a neuron path pop up if a path was recently clicked
|
|
680
|
-
checkAndCreatePopups:
|
|
768
|
+
checkAndCreatePopups: async function (data) {
|
|
681
769
|
// Call flatmap database to get the connection data
|
|
682
770
|
if (this.viewingMode === "Annotation") {
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
this.
|
|
686
|
-
this.displayTooltip(data.resource[0]);
|
|
771
|
+
if (data.feature && data.feature.featureId && data.feature.models) {
|
|
772
|
+
this.annotationEntry = { ...data.feature, resourceId: this.serverUUID };
|
|
773
|
+
this.displayTooltip(data.feature.models);
|
|
687
774
|
} else {
|
|
688
|
-
this.annotation = {
|
|
775
|
+
this.annotation = {};
|
|
689
776
|
}
|
|
690
777
|
} else {
|
|
691
|
-
let results =
|
|
692
|
-
|
|
778
|
+
let results =
|
|
779
|
+
await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(data);
|
|
780
|
+
// The line below only creates the tooltip if some data was found on the path
|
|
693
781
|
// result 0 is the connection, result 1 is the pubmed results from flatmap
|
|
694
|
-
if
|
|
782
|
+
if (
|
|
783
|
+
results[0] ||
|
|
784
|
+
results[1] ||
|
|
785
|
+
(data.feature.hyperlinks && data.feature.hyperlinks.length > 0)
|
|
786
|
+
) {
|
|
787
|
+
this.resourceForTooltip = data.resource[0];
|
|
788
|
+
data.resourceForTooltip = this.resourceForTooltip;
|
|
695
789
|
this.createTooltipFromNeuronCuration(data);
|
|
696
790
|
}
|
|
697
791
|
}
|
|
698
792
|
},
|
|
699
|
-
popUpCssHacks: function() {
|
|
793
|
+
popUpCssHacks: function () {
|
|
700
794
|
// Below is a hack to remove flatmap tooltips while popup is open
|
|
701
795
|
let ftooltip = document.querySelector(".flatmap-tooltip-popup");
|
|
702
796
|
if (ftooltip) ftooltip.style.display = "none";
|
|
@@ -708,12 +802,18 @@ export default {
|
|
|
708
802
|
"block";
|
|
709
803
|
};
|
|
710
804
|
},
|
|
711
|
-
|
|
805
|
+
closeTooltip: function () {
|
|
806
|
+
this.$refs.tooltip.$el.style.display = "none";
|
|
807
|
+
document.querySelectorAll(".maplibregl-popup").forEach((item) => {
|
|
808
|
+
item.style.display = "none";
|
|
809
|
+
});
|
|
810
|
+
},
|
|
811
|
+
createTooltipFromNeuronCuration: async function (data) {
|
|
712
812
|
this.tooltipEntry = await this.flatmapQueries.createTooltipData(data);
|
|
713
813
|
this.displayTooltip(data.resource[0]);
|
|
714
814
|
},
|
|
715
815
|
// Keeping this as an API
|
|
716
|
-
showPopup: function(featureId, node, options) {
|
|
816
|
+
showPopup: function (featureId, node, options) {
|
|
717
817
|
let myOptions = options;
|
|
718
818
|
if (this.mapImp) {
|
|
719
819
|
if (myOptions) {
|
|
@@ -724,46 +824,53 @@ export default {
|
|
|
724
824
|
this.mapImp.showPopup(featureId, node, myOptions);
|
|
725
825
|
}
|
|
726
826
|
},
|
|
727
|
-
showMarkerPopup: function(featureId, node, options) {
|
|
827
|
+
showMarkerPopup: function (featureId, node, options) {
|
|
728
828
|
if (this.mapImp) {
|
|
729
829
|
this.mapImp.showMarkerPopup(featureId, node, options);
|
|
730
830
|
}
|
|
731
831
|
},
|
|
732
|
-
closeMinimap: function(){
|
|
733
|
-
let minimapEl = this.$refs.flatmapContainer.querySelector(
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
832
|
+
closeMinimap: function () {
|
|
833
|
+
let minimapEl = this.$refs.flatmapContainer.querySelector(
|
|
834
|
+
".maplibregl-ctrl-minimap"
|
|
835
|
+
); // find minimap
|
|
836
|
+
if (this.minimapSmall) {
|
|
837
|
+
//switch the classes on the minimap
|
|
838
|
+
minimapEl.classList.add("enlarge");
|
|
839
|
+
minimapEl.classList.remove("shrink");
|
|
737
840
|
} else {
|
|
738
|
-
minimapEl.classList.add(
|
|
739
|
-
minimapEl.classList.remove(
|
|
841
|
+
minimapEl.classList.add("shrink");
|
|
842
|
+
minimapEl.classList.remove("enlarge");
|
|
740
843
|
}
|
|
741
844
|
this.minimapSmall = !this.minimapSmall;
|
|
742
845
|
},
|
|
743
|
-
addResizeButtonToMinimap: function(){
|
|
744
|
-
let minimapEl = this.$refs.flatmapContainer.querySelector(
|
|
745
|
-
|
|
746
|
-
|
|
846
|
+
addResizeButtonToMinimap: function () {
|
|
847
|
+
let minimapEl = this.$refs.flatmapContainer.querySelector(
|
|
848
|
+
".maplibregl-ctrl-minimap"
|
|
849
|
+
);
|
|
850
|
+
if (minimapEl) {
|
|
851
|
+
this.$refs.minimapResize.parentNode.removeChild(
|
|
852
|
+
this.$refs.minimapResize
|
|
853
|
+
);
|
|
747
854
|
minimapEl.appendChild(this.$refs.minimapResize);
|
|
748
855
|
this.minimapResizeShow = true;
|
|
749
856
|
}
|
|
750
857
|
},
|
|
751
|
-
setHelpMode: function(helpMode) {
|
|
858
|
+
setHelpMode: function (helpMode) {
|
|
752
859
|
if (helpMode) {
|
|
753
860
|
this.inHelp = true;
|
|
754
|
-
this.hoverVisibilities.forEach(item => {
|
|
861
|
+
this.hoverVisibilities.forEach((item) => {
|
|
755
862
|
item.value = true;
|
|
756
863
|
});
|
|
757
864
|
this.openFlatmapHelpPopup();
|
|
758
865
|
} else {
|
|
759
866
|
this.inHelp = false;
|
|
760
|
-
this.hoverVisibilities.forEach(item => {
|
|
867
|
+
this.hoverVisibilities.forEach((item) => {
|
|
761
868
|
item.value = false;
|
|
762
869
|
});
|
|
763
870
|
this.closeFlatmapHelpPopup();
|
|
764
871
|
}
|
|
765
872
|
},
|
|
766
|
-
showToolitip: function(tooltipNumber) {
|
|
873
|
+
showToolitip: function (tooltipNumber) {
|
|
767
874
|
if (!this.inHelp) {
|
|
768
875
|
clearTimeout(this.tooltipWait[tooltipNumber]);
|
|
769
876
|
this.tooltipWait[tooltipNumber] = setTimeout(() => {
|
|
@@ -771,7 +878,7 @@ export default {
|
|
|
771
878
|
}, 500);
|
|
772
879
|
}
|
|
773
880
|
},
|
|
774
|
-
hideToolitip: function(tooltipNumber) {
|
|
881
|
+
hideToolitip: function (tooltipNumber) {
|
|
775
882
|
if (!this.inHelp) {
|
|
776
883
|
clearTimeout(this.tooltipWait[tooltipNumber]);
|
|
777
884
|
this.tooltipWait[tooltipNumber] = setTimeout(() => {
|
|
@@ -779,7 +886,7 @@ export default {
|
|
|
779
886
|
}, 500);
|
|
780
887
|
}
|
|
781
888
|
},
|
|
782
|
-
displayTooltip: function(feature) {
|
|
889
|
+
displayTooltip: function (feature) {
|
|
783
890
|
this.mapImp.showPopup(
|
|
784
891
|
this.mapImp.modelFeatureIds(feature)[0],
|
|
785
892
|
this.$refs.tooltip.$el,
|
|
@@ -787,24 +894,24 @@ export default {
|
|
|
787
894
|
);
|
|
788
895
|
this.popUpCssHacks();
|
|
789
896
|
},
|
|
790
|
-
openFlatmapHelpPopup: function() {
|
|
897
|
+
openFlatmapHelpPopup: function () {
|
|
791
898
|
if (this.mapImp) {
|
|
792
899
|
let heartId = this.mapImp.featureIdsForModel("UBERON:0000948")[0];
|
|
793
900
|
const elm = "Click for more information";
|
|
794
901
|
this.mapImp.showPopup(heartId, elm, {
|
|
795
902
|
anchor: "top",
|
|
796
|
-
className: "flatmap-popup-popper"
|
|
903
|
+
className: "flatmap-popup-popper",
|
|
797
904
|
});
|
|
798
905
|
}
|
|
799
906
|
},
|
|
800
|
-
closeFlatmapHelpPopup: function() {
|
|
907
|
+
closeFlatmapHelpPopup: function () {
|
|
801
908
|
this.$el
|
|
802
909
|
.querySelectorAll(".maplibregl-popup-close-button")
|
|
803
|
-
.forEach(item => {
|
|
910
|
+
.forEach((item) => {
|
|
804
911
|
item.click();
|
|
805
912
|
});
|
|
806
913
|
},
|
|
807
|
-
getLabels: function() {
|
|
914
|
+
getLabels: function () {
|
|
808
915
|
let labels = [];
|
|
809
916
|
if (this.mapImp) {
|
|
810
917
|
let annotations = this.mapImp.annotations;
|
|
@@ -814,29 +921,29 @@ export default {
|
|
|
814
921
|
return Array.from(new Set(labels));
|
|
815
922
|
}
|
|
816
923
|
},
|
|
817
|
-
getState: function() {
|
|
924
|
+
getState: function () {
|
|
818
925
|
if (this.mapImp) {
|
|
819
926
|
let state = {
|
|
820
927
|
entry: this.entry,
|
|
821
|
-
viewport: this.mapImp.getState()
|
|
928
|
+
viewport: this.mapImp.getState(),
|
|
822
929
|
};
|
|
823
930
|
const identifier = this.mapImp.getIdentifier();
|
|
824
|
-
if (this.biologicalSex)
|
|
825
|
-
state['biologicalSex'] = this.biologicalSex;
|
|
931
|
+
if (this.biologicalSex) state["biologicalSex"] = this.biologicalSex;
|
|
826
932
|
else if (identifier && identifier.biologicalSex)
|
|
827
|
-
state[
|
|
828
|
-
if (identifier && identifier.uuid)
|
|
829
|
-
state['uuid'] = identifier.uuid;
|
|
933
|
+
state["biologicalSex"] = identifier.biologicalSex;
|
|
934
|
+
if (identifier && identifier.uuid) state["uuid"] = identifier.uuid;
|
|
830
935
|
return state;
|
|
831
936
|
}
|
|
832
937
|
return undefined;
|
|
833
938
|
},
|
|
834
|
-
setState: function(state) {
|
|
939
|
+
setState: function (state) {
|
|
835
940
|
if (state) {
|
|
836
|
-
if (
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
941
|
+
if (
|
|
942
|
+
this.mapImp &&
|
|
943
|
+
state.entry &&
|
|
944
|
+
this.entry == state.entry &&
|
|
945
|
+
(!state.biologicalSex || state.biologicalSex === this.biologicalSex)
|
|
946
|
+
) {
|
|
840
947
|
if (state.viewport) {
|
|
841
948
|
this.mapImp.setState(state.viewport);
|
|
842
949
|
}
|
|
@@ -846,15 +953,13 @@ export default {
|
|
|
846
953
|
this.setStateRequired = false;
|
|
847
954
|
}
|
|
848
955
|
},
|
|
849
|
-
restoreMapState: function(state) {
|
|
956
|
+
restoreMapState: function (state) {
|
|
850
957
|
if (state) {
|
|
851
|
-
if (state.viewport)
|
|
852
|
-
|
|
853
|
-
if (state.searchTerm)
|
|
854
|
-
this.searchAndShowResult(state.searchTerm, true);
|
|
958
|
+
if (state.viewport) this.mapImp.setState(state.viewport);
|
|
959
|
+
if (state.searchTerm) this.searchAndShowResult(state.searchTerm, true);
|
|
855
960
|
}
|
|
856
961
|
},
|
|
857
|
-
createFlatmap: function(state) {
|
|
962
|
+
createFlatmap: function (state) {
|
|
858
963
|
if (!this.mapImp && !this.loading) {
|
|
859
964
|
this.loading = true;
|
|
860
965
|
let minimap = false;
|
|
@@ -862,7 +967,7 @@ export default {
|
|
|
862
967
|
minimap = { position: "top-right" };
|
|
863
968
|
}
|
|
864
969
|
|
|
865
|
-
//As for flatmap-viewer@2.2.7, see below for the documentation
|
|
970
|
+
//As for flatmap-viewer@2.2.7, see below for the documentation
|
|
866
971
|
//for the identifier:
|
|
867
972
|
|
|
868
973
|
//@arg identifier {string|Object}
|
|
@@ -871,7 +976,7 @@ export default {
|
|
|
871
976
|
// or taxon and biological sex identifiers of the species that the map
|
|
872
977
|
// represents. The latest version of a map is loaded unless it has been
|
|
873
978
|
// identified using a ``uuid`` (see below).
|
|
874
|
-
// @arg identifier.taxon {string} The taxon identifier of the species
|
|
979
|
+
// @arg identifier.taxon {string} The taxon identifier of the species
|
|
875
980
|
// represented by the map. This is specified as metadata in the map's source file.
|
|
876
981
|
// @arg identifier.biologicalSex {string} The biological sex of the species
|
|
877
982
|
// represented by the map. This is specified as metadatain the map's source file.
|
|
@@ -892,7 +997,7 @@ export default {
|
|
|
892
997
|
identifier["biologicalSex"] = state.biologicalSex;
|
|
893
998
|
} else if (identifier.taxon === "NCBITaxon:9606") {
|
|
894
999
|
//For backward compatibility
|
|
895
|
-
identifier["biologicalSex"] ="PATO:0000384";
|
|
1000
|
+
identifier["biologicalSex"] = "PATO:0000384";
|
|
896
1001
|
}
|
|
897
1002
|
}
|
|
898
1003
|
} else {
|
|
@@ -917,20 +1022,23 @@ export default {
|
|
|
917
1022
|
pathControls: true,
|
|
918
1023
|
searchable: this.searchable,
|
|
919
1024
|
tooltips: this.tooltips,
|
|
920
|
-
minimap: minimap
|
|
1025
|
+
minimap: minimap,
|
|
921
1026
|
}
|
|
922
1027
|
);
|
|
923
|
-
promise1.then(returnedObject => {
|
|
1028
|
+
promise1.then((returnedObject) => {
|
|
924
1029
|
this.mapImp = returnedObject;
|
|
1030
|
+
this.serverUUID = this.mapImp.getIdentifier().uuid;
|
|
925
1031
|
this.onFlatmapReady();
|
|
926
|
-
if (this._stateToBeSet)
|
|
927
|
-
this.restoreMapState(this._stateToBeSet);
|
|
1032
|
+
if (this._stateToBeSet) this.restoreMapState(this._stateToBeSet);
|
|
928
1033
|
else {
|
|
929
1034
|
this.restoreMapState(state);
|
|
930
1035
|
}
|
|
931
1036
|
});
|
|
932
1037
|
} else if (state) {
|
|
933
|
-
this._stateToBeSet = {
|
|
1038
|
+
this._stateToBeSet = {
|
|
1039
|
+
viewport: state.viewport,
|
|
1040
|
+
searchTerm: state.searchTerm,
|
|
1041
|
+
};
|
|
934
1042
|
if (this.mapImp && !this.loading)
|
|
935
1043
|
this.restoreMapState(this._stateToBeSet);
|
|
936
1044
|
}
|
|
@@ -939,31 +1047,29 @@ export default {
|
|
|
939
1047
|
const elem = this.$refs.display;
|
|
940
1048
|
if (elem) {
|
|
941
1049
|
const computed = getComputedStyle(elem);
|
|
942
|
-
const padding =
|
|
1050
|
+
const padding =
|
|
1051
|
+
parseInt(computed.paddingTop) + parseInt(computed.paddingBottom);
|
|
943
1052
|
const height = elem.clientHeight - padding;
|
|
944
1053
|
this.pathwaysMaxHeight = height - 170;
|
|
945
1054
|
}
|
|
946
1055
|
},
|
|
947
|
-
mapResize: function() {
|
|
1056
|
+
mapResize: function () {
|
|
948
1057
|
try {
|
|
949
1058
|
this.computePathControlsMaximumHeight();
|
|
950
1059
|
if (this.mapImp) {
|
|
951
1060
|
this.mapImp.resize();
|
|
952
1061
|
this.showMinimap(this.displayMinimap);
|
|
953
1062
|
if (this.mapImp._minimap) {
|
|
954
|
-
|
|
1063
|
+
this.mapImp._minimap.resize();
|
|
955
1064
|
}
|
|
956
1065
|
}
|
|
957
1066
|
} catch {
|
|
958
1067
|
console.error("Map resize error");
|
|
959
1068
|
}
|
|
960
1069
|
},
|
|
961
|
-
onFlatmapReady: function(){
|
|
1070
|
+
onFlatmapReady: function () {
|
|
962
1071
|
// onFlatmapReady is used for functions that need to run immediately after the flatmap is loaded
|
|
963
|
-
this.sensor = new ResizeSensor(
|
|
964
|
-
this.$refs.display,
|
|
965
|
-
this.mapResize
|
|
966
|
-
);
|
|
1072
|
+
this.sensor = new ResizeSensor(this.$refs.display, this.mapResize);
|
|
967
1073
|
if (this.mapImp.options && this.mapImp.options.style === "functional") {
|
|
968
1074
|
this.isFC = true;
|
|
969
1075
|
}
|
|
@@ -974,7 +1080,10 @@ export default {
|
|
|
974
1080
|
//Disable layers for now
|
|
975
1081
|
//this.layers = this.mapImp.getLayers();
|
|
976
1082
|
this.systems = processSystems(this.mapImp.getSystems());
|
|
977
|
-
this.taxonConnectivity = processTaxon(
|
|
1083
|
+
this.taxonConnectivity = processTaxon(
|
|
1084
|
+
this.flatmapAPI,
|
|
1085
|
+
this.mapImp.taxonIdentifiers
|
|
1086
|
+
);
|
|
978
1087
|
this.addResizeButtonToMinimap();
|
|
979
1088
|
this.loading = false;
|
|
980
1089
|
this.computePathControlsMaximumHeight();
|
|
@@ -982,41 +1091,49 @@ export default {
|
|
|
982
1091
|
this.mapResize();
|
|
983
1092
|
this.$emit("ready", this);
|
|
984
1093
|
},
|
|
985
|
-
showMinimap: function(flag) {
|
|
986
|
-
if (this.mapImp)
|
|
987
|
-
this.mapImp.showMinimap(flag);
|
|
1094
|
+
showMinimap: function (flag) {
|
|
1095
|
+
if (this.mapImp) this.mapImp.showMinimap(flag);
|
|
988
1096
|
},
|
|
989
|
-
showPathwaysDrawer: function(flag) {
|
|
1097
|
+
showPathwaysDrawer: function (flag) {
|
|
990
1098
|
this.drawerOpen = flag;
|
|
991
1099
|
},
|
|
992
1100
|
/**
|
|
993
1101
|
* Function to display features with annotation matching the provided term,
|
|
994
|
-
* with the option to display the label using displayLabel flag.
|
|
1102
|
+
* with the option to display the label using displayLabel flag.
|
|
995
1103
|
*/
|
|
996
|
-
searchAndShowResult: function(term, displayLabel) {
|
|
1104
|
+
searchAndShowResult: function (term, displayLabel) {
|
|
997
1105
|
if (this.mapImp) {
|
|
998
1106
|
if (term === undefined || term === "") {
|
|
999
1107
|
this.mapImp.clearSearchResults();
|
|
1000
1108
|
return true;
|
|
1001
1109
|
} else {
|
|
1002
1110
|
const searchResults = this.mapImp.search(term);
|
|
1003
|
-
if (
|
|
1004
|
-
searchResults
|
|
1111
|
+
if (
|
|
1112
|
+
searchResults &&
|
|
1113
|
+
searchResults.results &&
|
|
1114
|
+
searchResults.results.length > 0
|
|
1115
|
+
) {
|
|
1005
1116
|
this.mapImp.showSearchResults(searchResults);
|
|
1006
|
-
if (
|
|
1007
|
-
|
|
1008
|
-
searchResults.results[0].
|
|
1009
|
-
|
|
1117
|
+
if (
|
|
1118
|
+
displayLabel &&
|
|
1119
|
+
searchResults.results[0].featureId &&
|
|
1120
|
+
searchResults.results[0].text
|
|
1121
|
+
) {
|
|
1122
|
+
const annotation = this.mapImp.annotation(
|
|
1123
|
+
searchResults.results[0].featureId
|
|
1124
|
+
);
|
|
1010
1125
|
this.mapImp.showPopup(
|
|
1011
1126
|
searchResults.results[0].featureId,
|
|
1012
1127
|
annotation.label,
|
|
1013
|
-
{
|
|
1014
|
-
|
|
1128
|
+
{
|
|
1129
|
+
className: "custom-popup",
|
|
1130
|
+
positionAtLastClick: false,
|
|
1131
|
+
preserveSelection: true,
|
|
1132
|
+
}
|
|
1133
|
+
);
|
|
1015
1134
|
}
|
|
1016
1135
|
return true;
|
|
1017
|
-
}
|
|
1018
|
-
else
|
|
1019
|
-
this.mapImp.clearSearchResults();
|
|
1136
|
+
} else this.mapImp.clearSearchResults();
|
|
1020
1137
|
}
|
|
1021
1138
|
}
|
|
1022
1139
|
return false;
|
|
@@ -1024,9 +1141,8 @@ export default {
|
|
|
1024
1141
|
/**
|
|
1025
1142
|
* Get the list of suggested terms
|
|
1026
1143
|
*/
|
|
1027
|
-
searchSuggestions: function(term) {
|
|
1028
|
-
if (this.mapImp)
|
|
1029
|
-
return this.mapImp.search(term);
|
|
1144
|
+
searchSuggestions: function (term) {
|
|
1145
|
+
if (this.mapImp) return this.mapImp.search(term);
|
|
1030
1146
|
return [];
|
|
1031
1147
|
},
|
|
1032
1148
|
},
|
|
@@ -1035,47 +1151,47 @@ export default {
|
|
|
1035
1151
|
uuid: String,
|
|
1036
1152
|
biologicalSex: {
|
|
1037
1153
|
type: String,
|
|
1038
|
-
default: ""
|
|
1154
|
+
default: "",
|
|
1039
1155
|
},
|
|
1040
1156
|
featureInfo: {
|
|
1041
1157
|
type: Boolean,
|
|
1042
|
-
default: false
|
|
1158
|
+
default: false,
|
|
1043
1159
|
},
|
|
1044
1160
|
minZoom: {
|
|
1045
1161
|
type: Number,
|
|
1046
|
-
default: 4
|
|
1162
|
+
default: 4,
|
|
1047
1163
|
},
|
|
1048
1164
|
pathControls: {
|
|
1049
1165
|
type: Boolean,
|
|
1050
|
-
default: false
|
|
1166
|
+
default: false,
|
|
1051
1167
|
},
|
|
1052
1168
|
searchable: {
|
|
1053
1169
|
type: Boolean,
|
|
1054
|
-
default: false
|
|
1170
|
+
default: false,
|
|
1055
1171
|
},
|
|
1056
1172
|
layerControl: {
|
|
1057
|
-
|
|
1058
|
-
|
|
1173
|
+
type: Boolean,
|
|
1174
|
+
default: false,
|
|
1059
1175
|
},
|
|
1060
1176
|
tooltips: {
|
|
1061
1177
|
type: Boolean,
|
|
1062
|
-
default: true
|
|
1178
|
+
default: true,
|
|
1063
1179
|
},
|
|
1064
1180
|
helpMode: {
|
|
1065
1181
|
type: Boolean,
|
|
1066
|
-
default: false
|
|
1182
|
+
default: false,
|
|
1067
1183
|
},
|
|
1068
1184
|
renderAtMounted: {
|
|
1069
1185
|
type: Boolean,
|
|
1070
|
-
default: true
|
|
1186
|
+
default: true,
|
|
1071
1187
|
},
|
|
1072
1188
|
displayMinimap: {
|
|
1073
1189
|
type: Boolean,
|
|
1074
|
-
default: false
|
|
1190
|
+
default: false,
|
|
1075
1191
|
},
|
|
1076
1192
|
displayWarning: {
|
|
1077
1193
|
type: Boolean,
|
|
1078
|
-
default: false
|
|
1194
|
+
default: false,
|
|
1079
1195
|
},
|
|
1080
1196
|
/**
|
|
1081
1197
|
* Flag to determine rather open map UI should be
|
|
@@ -1091,22 +1207,22 @@ export default {
|
|
|
1091
1207
|
return [
|
|
1092
1208
|
{
|
|
1093
1209
|
display: "Open AC Map",
|
|
1094
|
-
key: "AC"
|
|
1210
|
+
key: "AC",
|
|
1095
1211
|
},
|
|
1096
1212
|
{
|
|
1097
1213
|
display: "Open FC Map",
|
|
1098
|
-
key: "FC"
|
|
1214
|
+
key: "FC",
|
|
1099
1215
|
},
|
|
1100
1216
|
{
|
|
1101
1217
|
display: "Open 3D Human Map",
|
|
1102
|
-
key: "3D"
|
|
1218
|
+
key: "3D",
|
|
1103
1219
|
},
|
|
1104
|
-
]
|
|
1220
|
+
];
|
|
1105
1221
|
},
|
|
1106
1222
|
},
|
|
1107
1223
|
isLegacy: {
|
|
1108
1224
|
type: Boolean,
|
|
1109
|
-
default: false
|
|
1225
|
+
default: false,
|
|
1110
1226
|
},
|
|
1111
1227
|
displayLatestChanges: {
|
|
1112
1228
|
type: Boolean,
|
|
@@ -1114,38 +1230,38 @@ export default {
|
|
|
1114
1230
|
},
|
|
1115
1231
|
latestChangesMessage: {
|
|
1116
1232
|
type: String,
|
|
1117
|
-
default:
|
|
1233
|
+
default:
|
|
1234
|
+
"'Observed In' controls and information are now included in AC maps. System control with FTU information has been added to the FC map.",
|
|
1118
1235
|
},
|
|
1119
1236
|
/**
|
|
1120
1237
|
* State containing state of the flatmap.
|
|
1121
1238
|
*/
|
|
1122
1239
|
state: {
|
|
1123
1240
|
type: Object,
|
|
1124
|
-
default: undefined
|
|
1241
|
+
default: undefined,
|
|
1125
1242
|
},
|
|
1126
1243
|
/**
|
|
1127
1244
|
* Specify the endpoint of the flatmap server.
|
|
1128
1245
|
*/
|
|
1129
1246
|
flatmapAPI: {
|
|
1130
1247
|
type: String,
|
|
1131
|
-
default: "https://mapcore-demo.org/current/flatmap/v3/"
|
|
1248
|
+
default: "https://mapcore-demo.org/current/flatmap/v3/",
|
|
1132
1249
|
},
|
|
1133
1250
|
sparcAPI: {
|
|
1134
1251
|
type: String,
|
|
1135
|
-
default: "https://api.sparc.science/"
|
|
1252
|
+
default: "https://api.sparc.science/",
|
|
1136
1253
|
},
|
|
1137
1254
|
},
|
|
1138
1255
|
provide() {
|
|
1139
1256
|
return {
|
|
1257
|
+
flatmapAPI: this.flatmapAPI,
|
|
1140
1258
|
sparcAPI: this.sparcAPI,
|
|
1141
|
-
|
|
1142
|
-
}
|
|
1259
|
+
};
|
|
1143
1260
|
},
|
|
1144
|
-
data: function() {
|
|
1261
|
+
data: function () {
|
|
1145
1262
|
return {
|
|
1146
|
-
annotationEntry: {
|
|
1147
|
-
|
|
1148
|
-
},
|
|
1263
|
+
annotationEntry: {},
|
|
1264
|
+
serverUUID: undefined,
|
|
1149
1265
|
layers: [],
|
|
1150
1266
|
pathways: [],
|
|
1151
1267
|
sckanDisplay: [
|
|
@@ -1158,8 +1274,8 @@ export default {
|
|
|
1158
1274
|
{
|
|
1159
1275
|
label: "Display Nerves",
|
|
1160
1276
|
key: "centrelines",
|
|
1161
|
-
enabled: false
|
|
1162
|
-
}
|
|
1277
|
+
enabled: false,
|
|
1278
|
+
},
|
|
1163
1279
|
],
|
|
1164
1280
|
systems: [],
|
|
1165
1281
|
taxonConnectivity: [],
|
|
@@ -1192,21 +1308,18 @@ export default {
|
|
|
1192
1308
|
currentActive: "",
|
|
1193
1309
|
currentHover: "",
|
|
1194
1310
|
viewingMode: "Exploration",
|
|
1195
|
-
viewingModes: [
|
|
1196
|
-
"Annotation",
|
|
1197
|
-
"Exploration",
|
|
1198
|
-
]
|
|
1311
|
+
viewingModes: ["Annotation", "Exploration", "Network Discovery"],
|
|
1199
1312
|
};
|
|
1200
1313
|
},
|
|
1201
1314
|
watch: {
|
|
1202
|
-
entry: function() {
|
|
1315
|
+
entry: function () {
|
|
1203
1316
|
if (!this.state) this.createFlatmap();
|
|
1204
1317
|
},
|
|
1205
|
-
helpMode: function(val) {
|
|
1318
|
+
helpMode: function (val) {
|
|
1206
1319
|
this.setHelpMode(val);
|
|
1207
1320
|
},
|
|
1208
1321
|
state: {
|
|
1209
|
-
handler: function(state) {
|
|
1322
|
+
handler: function (state) {
|
|
1210
1323
|
if (this.mapManager) {
|
|
1211
1324
|
this.setState(state);
|
|
1212
1325
|
} else {
|
|
@@ -1215,10 +1328,10 @@ export default {
|
|
|
1215
1328
|
}
|
|
1216
1329
|
},
|
|
1217
1330
|
immediate: true,
|
|
1218
|
-
deep: true
|
|
1219
|
-
}
|
|
1331
|
+
deep: true,
|
|
1332
|
+
},
|
|
1220
1333
|
},
|
|
1221
|
-
mounted: function() {
|
|
1334
|
+
mounted: function () {
|
|
1222
1335
|
const flatmap = require("@abi-software/flatmap-viewer");
|
|
1223
1336
|
this.tooltipWait = [];
|
|
1224
1337
|
this.tooltipWait.length = this.hoverVisibilities.length;
|
|
@@ -1230,10 +1343,10 @@ export default {
|
|
|
1230
1343
|
if (this.setStateRequired) {
|
|
1231
1344
|
this.setState(this.state);
|
|
1232
1345
|
}
|
|
1233
|
-
} else if(this.renderAtMounted) {
|
|
1346
|
+
} else if (this.renderAtMounted) {
|
|
1234
1347
|
this.createFlatmap();
|
|
1235
1348
|
}
|
|
1236
|
-
}
|
|
1349
|
+
},
|
|
1237
1350
|
};
|
|
1238
1351
|
</script>
|
|
1239
1352
|
|
|
@@ -1249,7 +1362,7 @@ export default {
|
|
|
1249
1362
|
top: 90px;
|
|
1250
1363
|
left: 16px;
|
|
1251
1364
|
text-align: left;
|
|
1252
|
-
font-size: 25px;
|
|
1365
|
+
font-size: 25px;
|
|
1253
1366
|
}
|
|
1254
1367
|
|
|
1255
1368
|
.warning-icon {
|
|
@@ -1307,10 +1420,10 @@ export default {
|
|
|
1307
1420
|
}
|
|
1308
1421
|
|
|
1309
1422
|
.svg-legends-container {
|
|
1310
|
-
width:70%;
|
|
1311
|
-
height:auto;
|
|
1312
|
-
position:relative;
|
|
1313
|
-
max-height:140px;
|
|
1423
|
+
width: 70%;
|
|
1424
|
+
height: auto;
|
|
1425
|
+
position: relative;
|
|
1426
|
+
max-height: 140px;
|
|
1314
1427
|
}
|
|
1315
1428
|
|
|
1316
1429
|
.pathway-container {
|
|
@@ -1325,6 +1438,14 @@ export default {
|
|
|
1325
1438
|
overflow-x: hidden;
|
|
1326
1439
|
scrollbar-width: thin;
|
|
1327
1440
|
|
|
1441
|
+
transition: all 1s ease;
|
|
1442
|
+
&.open {
|
|
1443
|
+
opacity: 1;
|
|
1444
|
+
}
|
|
1445
|
+
&.close {
|
|
1446
|
+
opacity: 0;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1328
1449
|
&::-webkit-scrollbar {
|
|
1329
1450
|
width: 4px;
|
|
1330
1451
|
}
|
|
@@ -1528,8 +1649,8 @@ export default {
|
|
|
1528
1649
|
}
|
|
1529
1650
|
|
|
1530
1651
|
.el-button {
|
|
1531
|
-
padding-top:5px;
|
|
1532
|
-
padding-bottom:5px;
|
|
1652
|
+
padding-top: 5px;
|
|
1653
|
+
padding-bottom: 5px;
|
|
1533
1654
|
}
|
|
1534
1655
|
|
|
1535
1656
|
&.el-popper[x-placement^="top"] {
|
|
@@ -1589,7 +1710,7 @@ export default {
|
|
|
1589
1710
|
::v-deep .maplibregl-ctrl-minimap {
|
|
1590
1711
|
transform-origin: top right;
|
|
1591
1712
|
@media (max-width: 1250px) {
|
|
1592
|
-
height: 125px !important
|
|
1713
|
+
height: 125px !important; // important is needed here as we are over-riding the style set by the flatmap
|
|
1593
1714
|
width: 180px !important;
|
|
1594
1715
|
>>> .maplibregl-canvas .maplibregl-canvas {
|
|
1595
1716
|
height: 125px !important;
|
|
@@ -1606,7 +1727,7 @@ export default {
|
|
|
1606
1727
|
}
|
|
1607
1728
|
transition: all 1s ease;
|
|
1608
1729
|
&.shrink {
|
|
1609
|
-
transform: scale(0.5);
|
|
1730
|
+
transform: scale(0.5);
|
|
1610
1731
|
transform: scale(0.5);
|
|
1611
1732
|
}
|
|
1612
1733
|
}
|
|
@@ -1751,10 +1872,10 @@ export default {
|
|
|
1751
1872
|
.drawer-button {
|
|
1752
1873
|
float: left;
|
|
1753
1874
|
margin-top: calc(50% - 36px);
|
|
1754
|
-
background-color: #
|
|
1875
|
+
background-color: #f9f2fc;
|
|
1755
1876
|
|
|
1756
1877
|
i {
|
|
1757
|
-
font-weight: 600;
|
|
1878
|
+
font-weight: 600;
|
|
1758
1879
|
margin-top: 12px;
|
|
1759
1880
|
color: $app-primary-color;
|
|
1760
1881
|
transition-delay: 0.9s;
|
|
@@ -1815,7 +1936,7 @@ export default {
|
|
|
1815
1936
|
pointer-events: none;
|
|
1816
1937
|
display: none;
|
|
1817
1938
|
background: #fff;
|
|
1818
|
-
font-family: "Asap",sans-serif;
|
|
1939
|
+
font-family: "Asap", sans-serif;
|
|
1819
1940
|
font-size: 12pt;
|
|
1820
1941
|
color: $app-primary-color;
|
|
1821
1942
|
border: 1px solid $app-primary-color;
|
|
@@ -1886,23 +2007,24 @@ export default {
|
|
|
1886
2007
|
border: 1px solid rgb(144, 147, 153);
|
|
1887
2008
|
background-color: var(--white);
|
|
1888
2009
|
font-weight: 500;
|
|
1889
|
-
color:rgb(48, 49, 51)
|
|
2010
|
+
color: rgb(48, 49, 51);
|
|
1890
2011
|
::v-deep .el-input__inner {
|
|
1891
|
-
height:30px;
|
|
2012
|
+
height: 30px;
|
|
1892
2013
|
color: rgb(48, 49, 51);
|
|
1893
2014
|
}
|
|
1894
2015
|
::v-deep .el-input__inner {
|
|
1895
|
-
&is-focus,
|
|
2016
|
+
&is-focus,
|
|
2017
|
+
&:focus {
|
|
1896
2018
|
border: 1px solid $app-primary-color;
|
|
1897
2019
|
}
|
|
1898
2020
|
}
|
|
1899
2021
|
::v-deep .el-input__icon {
|
|
1900
|
-
line-height:30px
|
|
2022
|
+
line-height: 30px;
|
|
1901
2023
|
}
|
|
1902
2024
|
}
|
|
1903
2025
|
|
|
1904
2026
|
::v-deep .flatmap_dropdown {
|
|
1905
|
-
min-width: 160px!important;
|
|
2027
|
+
min-width: 160px !important;
|
|
1906
2028
|
.el-select-dropdown__item {
|
|
1907
2029
|
white-space: nowrap;
|
|
1908
2030
|
text-align: left;
|