@abi-software/mapintegratedvuer 1.8.0-beta.1 → 1.8.0-isan.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContentMixin-CthZZNjI.js +706 -0
- package/dist/{Flatmap-BMowLXfS.js → Flatmap-Bi9esI2v.js} +62 -60
- package/dist/{Iframe-fNcVYbXe.js → Iframe-bsYxppii.js} +2 -2
- package/dist/{MultiFlatmap-DuKi1y2A.js → MultiFlatmap-BWFsdMgS.js} +46 -37
- package/dist/{Plot-3jlnqIiS.js → Plot-gX8radCI.js} +2 -2
- package/dist/{Scaffold-Brboi1Ah.js → Scaffold-Dn3GeNi0.js} +7197 -7151
- package/dist/Simulation-Zgs0MXh1.js +30 -0
- package/dist/{index-B_H6BPK_.js → index-DFkMrKek.js} +23282 -21203
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +1663 -1009
- package/dist/{style-Bt2YbWCx.js → style-DlUxkFU-.js} +70145 -67320
- package/dist/style.css +1 -1
- package/package.json +8 -7
- package/src/App.vue +3 -14
- package/src/assets/header-icon.scss +7 -0
- package/src/components/ContentBar.vue +5 -1
- package/src/components/DialogToolbarContent.vue +87 -15
- package/src/components/FlatmapContextCard.vue +11 -8
- package/src/components/MapContent.vue +11 -21
- package/src/components/SplitFlow.vue +183 -108
- package/src/components/scripts/utilities.js +1 -1
- package/src/components/viewers/Flatmap.vue +6 -7
- package/src/components/viewers/MultiFlatmap.vue +25 -7
- package/src/components/viewers/Scaffold.vue +2 -2
- package/src/components/viewers/Simulation.vue +19 -1
- package/src/components.d.ts +4 -0
- package/src/mixins/ContentMixin.js +138 -80
- package/src/mixins/DynamicMarkerMixin.js +3 -1
- package/src/stores/settings.js +13 -10
- package/dist/ContentMixin-B9DtqhYT.js +0 -357
- package/dist/Simulation-BPEbHrzv.js +0 -22
@@ -23,14 +23,14 @@
|
|
23
23
|
:envVars="envVars"
|
24
24
|
:visible="sideBarVisibility"
|
25
25
|
:class="['side-bar', { 'start-up': startUp }]"
|
26
|
-
:activeTabId="activeDockedId"
|
27
26
|
:open-at-start="startUp"
|
28
27
|
:annotationEntry="annotationEntry"
|
29
28
|
:createData="createData"
|
30
|
-
:
|
31
|
-
|
29
|
+
:connectivityEntry="connectivityEntry"
|
30
|
+
:connectivityKnowledge="connectivityKnowledge"
|
31
|
+
@tabClicked="onSidebarTabClicked"
|
32
|
+
@tabClosed="onSidebarTabClosed"
|
32
33
|
@actionClick="actionClick"
|
33
|
-
@tabClicked="tabClicked"
|
34
34
|
@search-changed="searchChanged($event)"
|
35
35
|
@anatomy-in-datasets="updateMarkers($event)"
|
36
36
|
@annotation-submitted="onAnnotationSubmitted"
|
@@ -43,7 +43,10 @@
|
|
43
43
|
@datalink-clicked="datalinkClicked($event)"
|
44
44
|
@show-connectivity="onShowConnectivity"
|
45
45
|
@show-reference-connectivities="onShowReferenceConnectivities"
|
46
|
-
@connectivity-
|
46
|
+
@connectivity-clicked="onConnectivityClicked"
|
47
|
+
@connectivity-hovered="onConnectivityHovered"
|
48
|
+
@connectivity-explorer-clicked="onConnectivityExplorerClicked"
|
49
|
+
@connectivity-source-change="onConnectivitySourceChange"
|
47
50
|
/>
|
48
51
|
<SplitDialog
|
49
52
|
:entries="entries"
|
@@ -65,6 +68,7 @@ import EventBus from "./EventBus";
|
|
65
68
|
import SplitDialog from "./SplitDialog.vue";
|
66
69
|
// import contextCards from './context-cards'
|
67
70
|
import { SideBar } from "@abi-software/map-side-bar";
|
71
|
+
import "@abi-software/map-side-bar/dist/style.css";
|
68
72
|
import {
|
69
73
|
capitalise,
|
70
74
|
getNewMapEntry,
|
@@ -83,8 +87,6 @@ import {
|
|
83
87
|
ElMain as Main,
|
84
88
|
} from "element-plus";
|
85
89
|
|
86
|
-
import "@abi-software/map-side-bar/dist/style.css";
|
87
|
-
|
88
90
|
/**
|
89
91
|
* Component of the floating dialogs.
|
90
92
|
*/
|
@@ -117,16 +119,17 @@ export default {
|
|
117
119
|
sideBarVisibility: true,
|
118
120
|
startUp: true,
|
119
121
|
search: '',
|
120
|
-
activeDockedId : 1,
|
121
122
|
filterTriggered: false,
|
122
123
|
availableFacets: [],
|
123
|
-
|
124
|
-
annotationEntry:
|
124
|
+
connectivityEntry: [],
|
125
|
+
annotationEntry: [],
|
125
126
|
annotationCallback: undefined,
|
126
127
|
confirmCreateCallback: undefined,
|
127
128
|
cancelCreateCallback: undefined,
|
128
129
|
confirmDeleteCallback: undefined,
|
129
130
|
createData: {},
|
131
|
+
connectivityKnowledge: [],
|
132
|
+
connectivityExplorerClicked: false,
|
130
133
|
}
|
131
134
|
},
|
132
135
|
watch: {
|
@@ -141,14 +144,24 @@ export default {
|
|
141
144
|
},
|
142
145
|
},
|
143
146
|
methods: {
|
147
|
+
onConnectivityExplorerClicked: function (payload) {
|
148
|
+
this.connectivityExplorerClicked = true;
|
149
|
+
this.onDisplaySearch({ term: payload.id }, false);
|
150
|
+
},
|
144
151
|
/**
|
145
152
|
* Callback when an action is performed (open new dialogs).
|
146
153
|
*/
|
147
154
|
actionClick: function (action) {
|
148
155
|
if (action) {
|
149
156
|
if (action.type == "Search") {
|
150
|
-
if (action.
|
151
|
-
this.openSearch([action.filter], action.
|
157
|
+
if (action.filter) {
|
158
|
+
this.openSearch([action.filter], action.term);
|
159
|
+
Tagging.sendEvent({
|
160
|
+
'event': 'interaction_event',
|
161
|
+
'event_name': 'portal_maps_action_filter',
|
162
|
+
'category': action.term || 'filter',
|
163
|
+
'location': 'map_location_pin'
|
164
|
+
});
|
152
165
|
} else {
|
153
166
|
this.openSearch([], action.term);
|
154
167
|
// GA Tagging
|
@@ -164,11 +177,29 @@ export default {
|
|
164
177
|
});
|
165
178
|
this.filterTriggered = true;
|
166
179
|
}
|
180
|
+
} else if (action.type == "PMRSearch") {
|
181
|
+
if (action.term) {
|
182
|
+
let term = action.term;
|
183
|
+
if (term === "cvs:functional.cell") {
|
184
|
+
term = "cellular";
|
185
|
+
} else if (term === "cvs:functional.tissue") {
|
186
|
+
term = "tissue scale";
|
187
|
+
} else if (term === "cvs:functional.whole-body") {
|
188
|
+
term = "whole-body scale";
|
189
|
+
}
|
190
|
+
term = `"${term}"`;
|
191
|
+
this.openPMRSearch([], term);
|
192
|
+
Tagging.sendEvent({
|
193
|
+
'event': 'interaction_event',
|
194
|
+
'event_name': 'portal_maps_action_filter',
|
195
|
+
'category': action.term || 'filter',
|
196
|
+
'location': 'map_location_pin'
|
197
|
+
});
|
198
|
+
}
|
167
199
|
} else if (action.type == "URL") {
|
168
200
|
window.open(action.resource, "_blank");
|
169
201
|
} else if (action.type == "Facet") {
|
170
202
|
if (this.$refs.sideBar) {
|
171
|
-
this.closeConnectivityInfo();
|
172
203
|
this.$refs.sideBar.addFilter(action);
|
173
204
|
const { facet } = action;
|
174
205
|
// GA Tagging
|
@@ -190,33 +221,31 @@ export default {
|
|
190
221
|
facetPropPath: "organisms.primary.species.name",
|
191
222
|
});
|
192
223
|
});
|
193
|
-
if (facets.length == 0)
|
194
|
-
facets.push({
|
195
|
-
facet: "Show All",
|
196
|
-
term: "Species",
|
197
|
-
facetPropPath: "organisms.primary.species.name",
|
198
|
-
});
|
199
224
|
facets.push(
|
200
225
|
...action.labels.map(val => ({
|
201
226
|
facet: capitalise(val),
|
202
227
|
term: "Anatomical structure",
|
203
228
|
facetPropPath: "anatomy.organ.category.name",
|
229
|
+
facetSubPropPath: "anatomy.organ.name",
|
204
230
|
}))
|
205
231
|
);
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
}
|
232
|
+
this.openSearch(facets, "")
|
233
|
+
const filterValuesArray = intersectArrays(this.availableFacets, action.labels);
|
234
|
+
const filterValues = filterValuesArray.join(', ');
|
235
|
+
// GA Tagging
|
236
|
+
// Event tracking for map action search/filter data
|
237
|
+
Tagging.sendEvent({
|
238
|
+
'event': 'interaction_event',
|
239
|
+
'event_name': 'portal_maps_action_filter',
|
240
|
+
'category': filterValues || 'filter',
|
241
|
+
'location': 'map_popup_button'
|
242
|
+
});
|
243
|
+
} else if (action.type == "OpenCOR") {
|
244
|
+
if (action.resource) {
|
245
|
+
const link = `https://opencor.ws/appdev/?openFile/${action.resource}`;
|
246
|
+
if (window) {
|
247
|
+
window.open(link,'_blank');
|
248
|
+
}
|
220
249
|
}
|
221
250
|
} else {
|
222
251
|
this.trackGalleryClick(action);
|
@@ -251,7 +280,7 @@ export default {
|
|
251
280
|
'file_path': filePath,
|
252
281
|
});
|
253
282
|
},
|
254
|
-
onDisplaySearch: function (payload) {
|
283
|
+
onDisplaySearch: function (payload, tracking = true) {
|
255
284
|
let searchFound = false;
|
256
285
|
//Search all active viewers when global callback is on
|
257
286
|
let splitdialog = this.$refs.splitdialog;
|
@@ -265,14 +294,16 @@ export default {
|
|
265
294
|
}
|
266
295
|
this.$refs.dialogToolbar.setFailedSearch(searchFound ? undefined : payload.term);
|
267
296
|
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
297
|
+
if (tracking) {
|
298
|
+
// GA Tagging
|
299
|
+
// Event tracking for map on display search
|
300
|
+
Tagging.sendEvent({
|
301
|
+
'event': 'interaction_event',
|
302
|
+
'event_name': 'portal_maps_display_search',
|
303
|
+
'category': payload.term,
|
304
|
+
'location': 'map_toolbar'
|
305
|
+
});
|
306
|
+
}
|
276
307
|
},
|
277
308
|
fetchSuggestions: function(payload) {
|
278
309
|
const suggestions = [];
|
@@ -310,55 +341,83 @@ export default {
|
|
310
341
|
onShowReferenceConnectivities: function (refSource) {
|
311
342
|
EventBus.emit('show-reference-connectivities', refSource);
|
312
343
|
},
|
313
|
-
|
314
|
-
|
315
|
-
|
344
|
+
onConnectivityClicked: function (data) {
|
345
|
+
if (this.$refs && this.$refs.sideBar) {
|
346
|
+
this.connectivityEntry = [];
|
347
|
+
EventBus.emit("connectivity-query-filter", {
|
348
|
+
id: 2,
|
349
|
+
type: "query-filter-update",
|
350
|
+
query: data.query,
|
351
|
+
filter: data.filter,
|
352
|
+
data: data.data,
|
353
|
+
});
|
354
|
+
this.$refs.sideBar.openConnectivitySearch(data.filter, data.query);
|
355
|
+
}
|
356
|
+
},
|
357
|
+
onConnectivityHovered: function (data) {
|
358
|
+
EventBus.emit('connectivity-hovered', {
|
359
|
+
connectivityEntry: this.connectivityEntry,
|
316
360
|
data: data,
|
317
361
|
});
|
318
362
|
},
|
363
|
+
onConnectivitySourceChange: function (data) {
|
364
|
+
this.connectivityExplorerClicked = true;
|
365
|
+
EventBus.emit('connectivity-source-change', data);
|
366
|
+
},
|
319
367
|
hoverChanged: function (data) {
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
368
|
+
let hoverAnatomies = [], hoverOrgans = [], hoverDOI = '', hoverConnectivity = [];
|
369
|
+
if (data) {
|
370
|
+
if (data.type === 'dataset') {
|
371
|
+
hoverAnatomies = data.anatomy ? data.anatomy : [];
|
372
|
+
hoverOrgans = data.organs ? data.organs : [];
|
373
|
+
hoverDOI = data.doi ? data.doi : '';
|
374
|
+
} else if (data.type === 'connectivity') {
|
375
|
+
hoverConnectivity = data.id ? [data.id] : '';
|
376
|
+
}
|
377
|
+
}
|
378
|
+
this.settingsStore.updateHoverFeatures(hoverAnatomies, hoverOrgans, hoverDOI, hoverConnectivity);
|
324
379
|
EventBus.emit("hoverUpdate");
|
325
380
|
},
|
326
381
|
searchChanged: function (data) {
|
327
|
-
if (data
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
382
|
+
if (data.id === 1) {
|
383
|
+
if (data && data.type == "query-update") {
|
384
|
+
this.search = data.value;
|
385
|
+
if (this.search && !this.filterTriggered) {
|
386
|
+
// GA Tagging
|
387
|
+
// Event tracking for map action search/filter data
|
388
|
+
Tagging.sendEvent({
|
389
|
+
'event': 'interaction_event',
|
390
|
+
'event_name': 'portal_maps_action_search',
|
391
|
+
'category': this.search,
|
392
|
+
'location': 'map_sidebar_search'
|
393
|
+
});
|
394
|
+
}
|
395
|
+
this.filterTriggered = false; // reset for next action
|
338
396
|
}
|
339
|
-
|
340
|
-
|
341
|
-
if (data && data.type == "filter-update") {
|
342
|
-
this.settingsStore.updateFacets(data.value);
|
397
|
+
if (data && data.type == "filter-update") {
|
398
|
+
this.settingsStore.updateFacets(data.value);
|
343
399
|
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
400
|
+
// Remove filter event from maps' popup
|
401
|
+
if (!this.filterTriggered) {
|
402
|
+
const { value } = data;
|
403
|
+
const filterValuesArray = value.filter((val) =>
|
404
|
+
val.facet && val.facet.toLowerCase() !== 'show all'
|
405
|
+
).map((val) => val.facet);
|
406
|
+
const filterValues = filterValuesArray.join(', ');
|
351
407
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
408
|
+
// GA Tagging
|
409
|
+
// Event tracking for map action search/filter data
|
410
|
+
Tagging.sendEvent({
|
411
|
+
'event': 'interaction_event',
|
412
|
+
'event_name': 'portal_maps_action_filter',
|
413
|
+
'category': filterValues || 'filter',
|
414
|
+
'location': 'map_sidebar_filter'
|
415
|
+
});
|
416
|
+
}
|
417
|
+
this.filterTriggered = false; // reset for next action
|
360
418
|
}
|
361
|
-
|
419
|
+
} else if (data.id === 2) {
|
420
|
+
EventBus.emit("connectivity-query-filter", data);
|
362
421
|
}
|
363
422
|
},
|
364
423
|
updateMarkers: function (data) {
|
@@ -437,17 +496,17 @@ export default {
|
|
437
496
|
this.search = query;
|
438
497
|
this._facets = facets;
|
439
498
|
if (this.$refs && this.$refs.sideBar) {
|
440
|
-
this.closeConnectivityInfo();
|
441
499
|
this.$refs.sideBar.openSearch(facets, query);
|
500
|
+
//this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
|
442
501
|
}
|
443
502
|
this.startUp = false;
|
444
503
|
},
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
504
|
+
openPMRSearch: function (facets, query) {
|
505
|
+
if (this.$refs && this.$refs.sideBar) {
|
506
|
+
this.$refs.sideBar.openPMRSearch(facets, query);
|
507
|
+
//this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
|
508
|
+
}
|
509
|
+
this.startUp = false;
|
451
510
|
},
|
452
511
|
onFullscreen: function (val) {
|
453
512
|
this.$emit("onFullscreen", val);
|
@@ -497,9 +556,6 @@ export default {
|
|
497
556
|
this.$refs.sideBar.close();
|
498
557
|
}
|
499
558
|
},
|
500
|
-
tabClicked: function ({id, type}) {
|
501
|
-
this.activeDockedId = id;
|
502
|
-
},
|
503
559
|
toggleSyncMode: function (payload) {
|
504
560
|
if (payload) {
|
505
561
|
if (payload.flag) {
|
@@ -558,12 +614,18 @@ export default {
|
|
558
614
|
this.confirmDeleteCallback(payload);
|
559
615
|
}
|
560
616
|
},
|
561
|
-
|
562
|
-
|
563
|
-
if (id ===
|
617
|
+
onSidebarTabClicked: function (tab) {
|
618
|
+
let globalSettings = { ...this.settingsStore.globalSettings };
|
619
|
+
if (tab.id === 1 && tab.type === 'datasetExplorer') {
|
620
|
+
globalSettings.interactiveMode = 'dataset';
|
621
|
+
} else if (tab.id === 2 && tab.type === 'connectivityExplorer') {
|
622
|
+
globalSettings.interactiveMode = 'connectivity';
|
623
|
+
}
|
624
|
+
this.settingsStore.updateGlobalSettings(globalSettings);
|
625
|
+
this.$refs.dialogToolbar.loadGlobalSettings();
|
564
626
|
},
|
565
|
-
|
566
|
-
|
627
|
+
onSidebarTabClosed: function (tab) {
|
628
|
+
if (tab.id === 3 && tab.type === "annotation") EventBus.emit('annotation-close');
|
567
629
|
},
|
568
630
|
},
|
569
631
|
created: function () {
|
@@ -592,29 +654,32 @@ export default {
|
|
592
654
|
this.cancelCreateCallback = markRaw(payload.cancelCreate);
|
593
655
|
this.confirmDeleteCallback = markRaw(payload.confirmDelete);
|
594
656
|
if (this.$refs.sideBar) {
|
595
|
-
this.tabClicked({id: 3, type: 'annotation'});
|
657
|
+
this.$refs.sideBar.tabClicked({id: 3, type: 'annotation'});
|
596
658
|
this.$refs.sideBar.setDrawerOpen(true);
|
597
659
|
}
|
598
660
|
});
|
599
|
-
EventBus.on('annotation-close',
|
600
|
-
this.tabClicked({id: 1, type: '
|
601
|
-
this.annotationEntry =
|
661
|
+
EventBus.on('annotation-close', () => {
|
662
|
+
this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
|
663
|
+
this.annotationEntry = [];
|
602
664
|
this.createData = {};
|
603
665
|
if (this.$refs.sideBar) {
|
604
666
|
this.$refs.sideBar.setDrawerOpen(false);
|
605
667
|
}
|
606
668
|
});
|
607
669
|
EventBus.on('connectivity-info-open', payload => {
|
608
|
-
this.
|
609
|
-
|
610
|
-
|
611
|
-
|
670
|
+
this.connectivityEntry = payload;
|
671
|
+
// click on the flatmap paths/features directly
|
672
|
+
// or onDisplaySearch is performed
|
673
|
+
if (!this.connectivityExplorerClicked) {
|
674
|
+
this.connectivityKnowledge = payload.map((entry) => {
|
675
|
+
return { label: entry.title, id: entry.featureId[0] }
|
676
|
+
});
|
677
|
+
if (this.$refs.sideBar) {
|
678
|
+
this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
|
679
|
+
this.$refs.sideBar.setDrawerOpen(true);
|
680
|
+
}
|
612
681
|
}
|
613
|
-
|
614
|
-
EventBus.on('connectivity-info-close', payload => {
|
615
|
-
this.tabClicked({id: 1, type: 'search'});
|
616
|
-
this.connectivityInfo = null;
|
617
|
-
this.resetActivePathways();
|
682
|
+
this.connectivityExplorerClicked = false;
|
618
683
|
});
|
619
684
|
EventBus.on('connectivity-graph-error', payload => {
|
620
685
|
if (this.$refs.sideBar) {
|
@@ -629,6 +694,16 @@ export default {
|
|
629
694
|
this.$refs.sideBar.close();
|
630
695
|
}
|
631
696
|
});
|
697
|
+
EventBus.on("connectivity-knowledge", payload => {
|
698
|
+
this.connectivityKnowledge = payload;
|
699
|
+
})
|
700
|
+
EventBus.on("modeUpdate", payload => {
|
701
|
+
if (payload === "dataset") {
|
702
|
+
this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
|
703
|
+
} else if (payload === "connectivity") {
|
704
|
+
this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
|
705
|
+
}
|
706
|
+
})
|
632
707
|
this.$nextTick(() => {
|
633
708
|
if (this.search === "" && this._facets.length === 0) {
|
634
709
|
if (this.$refs.sideBar) {
|
@@ -6,7 +6,7 @@
|
|
6
6
|
:mapManager="mapManager"
|
7
7
|
@resource-selected="flatmaprResourceSelected(entry.type, $event)"
|
8
8
|
@pan-zoom-callback="flatmapPanZoomCallback"
|
9
|
-
:name="entry.resource"
|
9
|
+
:name="entry.resource ? entry.resource : entry.data"
|
10
10
|
style="height: 100%; width: 100%"
|
11
11
|
:minZoom="entry.minZoom"
|
12
12
|
:helpMode="helpMode"
|
@@ -20,7 +20,6 @@
|
|
20
20
|
@annotation-close="onAnnotationClose"
|
21
21
|
:annotationSidebar="annotationSidebar"
|
22
22
|
@connectivity-info-open="onConnectivityInfoOpen"
|
23
|
-
@connectivity-info-close="onConnectivityInfoClose"
|
24
23
|
@connectivity-graph-error="onConnectivityGraphError"
|
25
24
|
:connectivityInfoSidebar="connectivityInfoSidebar"
|
26
25
|
:pathControls="true"
|
@@ -81,8 +80,8 @@ export default {
|
|
81
80
|
return this.$refs.flatmap?.mapImp;
|
82
81
|
},
|
83
82
|
flatmaprResourceSelected: function (type, resource) {
|
84
|
-
this.resourceSelected(
|
85
|
-
|
83
|
+
this.resourceSelected(
|
84
|
+
type, resource, (this.$refs.flatmap.viewingMode === "Exploration"));
|
86
85
|
if (resource.eventType === 'click' && resource.feature.type === 'feature') {
|
87
86
|
const eventData = {
|
88
87
|
label: resource.label || '',
|
@@ -173,9 +172,9 @@ export default {
|
|
173
172
|
},
|
174
173
|
},
|
175
174
|
mounted: function() {
|
176
|
-
EventBus.on('annotation-close', (
|
175
|
+
EventBus.on('annotation-close', () => {
|
177
176
|
const currentFlatmap = this.$refs.flatmap;
|
178
|
-
if (
|
177
|
+
if (currentFlatmap) {
|
179
178
|
this.$refs.flatmap.annotationEventCallback({}, { type: 'aborted' })
|
180
179
|
}
|
181
180
|
});
|
@@ -183,7 +182,7 @@ export default {
|
|
183
182
|
this.flatmapMarkerUpdate(undefined);
|
184
183
|
});
|
185
184
|
EventBus.on("hoverUpdate", () => {
|
186
|
-
this.
|
185
|
+
this.cardHoverHighlight();
|
187
186
|
});
|
188
187
|
EventBus.on('show-connectivity', (payload) => {
|
189
188
|
const { featureIds, offset } = payload;
|
@@ -19,7 +19,6 @@
|
|
19
19
|
@annotation-close="onAnnotationClose"
|
20
20
|
:annotationSidebar="annotationSidebar"
|
21
21
|
@connectivity-info-open="onConnectivityInfoOpen"
|
22
|
-
@connectivity-info-close="onConnectivityInfoClose"
|
23
22
|
@connectivity-graph-error="onConnectivityGraphError"
|
24
23
|
:connectivityInfoSidebar="connectivityInfoSidebar"
|
25
24
|
ref="multiflatmap"
|
@@ -308,6 +307,7 @@ export default {
|
|
308
307
|
const imp = this.getFlatmapImp();
|
309
308
|
if (imp) {
|
310
309
|
let provClone = {id: this.entry.id, prov: imp.provenance};
|
310
|
+
EventBus.emit("mapImpProv", provClone);
|
311
311
|
this.$emit("flatmap-provenance-ready", provClone);
|
312
312
|
}
|
313
313
|
},
|
@@ -320,7 +320,6 @@ export default {
|
|
320
320
|
await this.toggleSyncMode();
|
321
321
|
}
|
322
322
|
this.updateProvCard();
|
323
|
-
this.onConnectivityInfoClose();
|
324
323
|
|
325
324
|
// GA Tagging
|
326
325
|
// Event tracking for maps' species change
|
@@ -337,11 +336,12 @@ export default {
|
|
337
336
|
const flatmapImp = flatmap.mapImp;
|
338
337
|
this.flatmapMarkerUpdate(flatmapImp);
|
339
338
|
this.updateProvCard();
|
339
|
+
this.loadConnectivityKnowledge(flatmapImp);
|
340
340
|
EventBus.emit("mapLoaded", flatmap);
|
341
341
|
}
|
342
342
|
},
|
343
343
|
getFlatmapImp: function () {
|
344
|
-
if (this.
|
344
|
+
if (this.flatmapReady && this.$refs.multiflatmap) {
|
345
345
|
return this.$refs.multiflatmap.getCurrentFlatmap()["mapImp"];
|
346
346
|
} else {
|
347
347
|
return undefined;
|
@@ -426,6 +426,12 @@ export default {
|
|
426
426
|
flatmap.showConnectivityTooltips(payload);
|
427
427
|
}
|
428
428
|
},
|
429
|
+
changeConnectivitySource: function (payload) {
|
430
|
+
if (this.flatmapReady) {
|
431
|
+
const flatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
432
|
+
flatmap.changeConnectivitySource(payload);
|
433
|
+
}
|
434
|
+
},
|
429
435
|
},
|
430
436
|
computed: {
|
431
437
|
facetSpecies() {
|
@@ -451,8 +457,8 @@ export default {
|
|
451
457
|
mounted: function () {
|
452
458
|
this.getFeaturedDatasets();
|
453
459
|
|
454
|
-
EventBus.on('annotation-close', (
|
455
|
-
if (
|
460
|
+
EventBus.on('annotation-close', () => {
|
461
|
+
if (this.flatmapReady && this.$refs.multiflatmap) {
|
456
462
|
const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
457
463
|
currentFlatmap.annotationEventCallback({}, { type: 'aborted' })
|
458
464
|
}
|
@@ -480,10 +486,14 @@ export default {
|
|
480
486
|
}
|
481
487
|
});
|
482
488
|
|
483
|
-
EventBus.on('connectivity-
|
489
|
+
EventBus.on('connectivity-hovered', (payload) => {
|
484
490
|
this.showConnectivityTooltips(payload);
|
485
491
|
});
|
486
492
|
|
493
|
+
EventBus.on('connectivity-source-change', (payload) => {
|
494
|
+
this.changeConnectivitySource(payload);
|
495
|
+
});
|
496
|
+
|
487
497
|
EventBus.on("markerUpdate", () => {
|
488
498
|
if (this.flatmapReady) {
|
489
499
|
this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
|
@@ -491,7 +501,15 @@ export default {
|
|
491
501
|
});
|
492
502
|
EventBus.on("hoverUpdate", () => {
|
493
503
|
if (this.flatmapReady) {
|
494
|
-
this.
|
504
|
+
this.cardHoverHighlight();
|
505
|
+
}
|
506
|
+
});
|
507
|
+
EventBus.on("connectivity-query-filter", (payload) => {
|
508
|
+
if (this.flatmapReady && this.$refs.multiflatmap) {
|
509
|
+
const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
510
|
+
if (currentFlatmap) {
|
511
|
+
this.connectivityQueryFilter(currentFlatmap, payload)
|
512
|
+
}
|
495
513
|
}
|
496
514
|
});
|
497
515
|
},
|
@@ -201,7 +201,7 @@ export default {
|
|
201
201
|
}
|
202
202
|
},
|
203
203
|
markerLabels: function () {
|
204
|
-
return this.settingsStore.globalSettings.
|
204
|
+
return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
|
205
205
|
},
|
206
206
|
},
|
207
207
|
data: function () {
|
@@ -219,7 +219,7 @@ export default {
|
|
219
219
|
});
|
220
220
|
EventBus.on("hoverUpdate", () => {
|
221
221
|
if (this.scaffoldLoaded) {
|
222
|
-
this.
|
222
|
+
this.cardHoverHighlight();
|
223
223
|
}
|
224
224
|
});
|
225
225
|
},
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<SimulationVuer
|
3
3
|
:apiLocation="apiLocation"
|
4
|
-
:id="
|
4
|
+
:id="id"
|
5
5
|
/>
|
6
6
|
</template>
|
7
7
|
|
@@ -13,9 +13,27 @@ import "@abi-software/simulationvuer/dist/style.css";
|
|
13
13
|
|
14
14
|
export default {
|
15
15
|
name: "Simulation",
|
16
|
+
data: function() {
|
17
|
+
return {
|
18
|
+
id: undefined,
|
19
|
+
};
|
20
|
+
},
|
16
21
|
mixins: [ ContentMixin ],
|
17
22
|
components: {
|
18
23
|
SimulationVuer,
|
19
24
|
},
|
25
|
+
created: function() {
|
26
|
+
if (this.entry) {
|
27
|
+
if (this.entry.discoverId) {
|
28
|
+
this.id = this.entry.discoverId;
|
29
|
+
} else if (this.entry.resource) {
|
30
|
+
if (this.settingsStore.pmrHost) {
|
31
|
+
this.id = this.entry.resource.replace(this.settingsStore.pmrHost, '');
|
32
|
+
} else {
|
33
|
+
this.id = this.entry.resource;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
20
38
|
};
|
21
39
|
</script>
|