@abi-software/mapintegratedvuer 1.7.2 → 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.
Files changed (31) hide show
  1. package/dist/ContentMixin-CthZZNjI.js +706 -0
  2. package/dist/{Flatmap-fO2lvKFX.js → Flatmap-Bi9esI2v.js} +24 -19
  3. package/dist/{Iframe-C8wxLuOy.js → Iframe-bsYxppii.js} +2 -2
  4. package/dist/{MultiFlatmap-Dijv5l_F.js → MultiFlatmap-BWFsdMgS.js} +49 -35
  5. package/dist/{Plot-iXTevaO7.js → Plot-gX8radCI.js} +2 -2
  6. package/dist/{Scaffold-_QafxYws.js → Scaffold-Dn3GeNi0.js} +10241 -10168
  7. package/dist/Simulation-Zgs0MXh1.js +30 -0
  8. package/dist/{index-DcTjoXV1.js → index-DFkMrKek.js} +22249 -19928
  9. package/dist/mapintegratedvuer.js +1 -1
  10. package/dist/mapintegratedvuer.umd.cjs +1667 -1009
  11. package/dist/{style-C2GyLbPa.js → style-DlUxkFU-.js} +75606 -75481
  12. package/dist/style.css +1 -1
  13. package/package.json +8 -7
  14. package/src/App.vue +39 -18
  15. package/src/assets/header-icon.scss +7 -0
  16. package/src/components/ContentBar.vue +5 -1
  17. package/src/components/DialogToolbarContent.vue +91 -6
  18. package/src/components/FlatmapContextCard.vue +11 -8
  19. package/src/components/MapContent.vue +62 -46
  20. package/src/components/SplitFlow.vue +188 -112
  21. package/src/components/scripts/utilities.js +1 -1
  22. package/src/components/viewers/Flatmap.vue +12 -7
  23. package/src/components/viewers/MultiFlatmap.vue +34 -7
  24. package/src/components/viewers/Scaffold.vue +2 -2
  25. package/src/components/viewers/Simulation.vue +19 -1
  26. package/src/components.d.ts +4 -0
  27. package/src/mixins/ContentMixin.js +155 -47
  28. package/src/mixins/DynamicMarkerMixin.js +3 -1
  29. package/src/stores/settings.js +31 -5
  30. package/dist/ContentMixin-CdE8AlUJ.js +0 -339
  31. package/dist/Simulation-CJ-9g74P.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
- :connectivityInfo="connectivityInfo"
31
- @tab-close="onSidebarTabClose"
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"
@@ -42,7 +42,11 @@
42
42
  @contextUpdate="contextUpdate($event)"
43
43
  @datalink-clicked="datalinkClicked($event)"
44
44
  @show-connectivity="onShowConnectivity"
45
- @connectivity-component-click="onConnectivityComponentClick"
45
+ @show-reference-connectivities="onShowReferenceConnectivities"
46
+ @connectivity-clicked="onConnectivityClicked"
47
+ @connectivity-hovered="onConnectivityHovered"
48
+ @connectivity-explorer-clicked="onConnectivityExplorerClicked"
49
+ @connectivity-source-change="onConnectivitySourceChange"
46
50
  />
47
51
  <SplitDialog
48
52
  :entries="entries"
@@ -64,6 +68,7 @@ import EventBus from "./EventBus";
64
68
  import SplitDialog from "./SplitDialog.vue";
65
69
  // import contextCards from './context-cards'
66
70
  import { SideBar } from "@abi-software/map-side-bar";
71
+ import "@abi-software/map-side-bar/dist/style.css";
67
72
  import {
68
73
  capitalise,
69
74
  getNewMapEntry,
@@ -82,8 +87,6 @@ import {
82
87
  ElMain as Main,
83
88
  } from "element-plus";
84
89
 
85
- import "@abi-software/map-side-bar/dist/style.css";
86
-
87
90
  /**
88
91
  * Component of the floating dialogs.
89
92
  */
@@ -116,16 +119,17 @@ export default {
116
119
  sideBarVisibility: true,
117
120
  startUp: true,
118
121
  search: '',
119
- activeDockedId : 1,
120
122
  filterTriggered: false,
121
123
  availableFacets: [],
122
- connectivityInfo: null,
123
- annotationEntry: {},
124
+ connectivityEntry: [],
125
+ annotationEntry: [],
124
126
  annotationCallback: undefined,
125
127
  confirmCreateCallback: undefined,
126
128
  cancelCreateCallback: undefined,
127
129
  confirmDeleteCallback: undefined,
128
130
  createData: {},
131
+ connectivityKnowledge: [],
132
+ connectivityExplorerClicked: false,
129
133
  }
130
134
  },
131
135
  watch: {
@@ -140,14 +144,24 @@ export default {
140
144
  },
141
145
  },
142
146
  methods: {
147
+ onConnectivityExplorerClicked: function (payload) {
148
+ this.connectivityExplorerClicked = true;
149
+ this.onDisplaySearch({ term: payload.id }, false);
150
+ },
143
151
  /**
144
152
  * Callback when an action is performed (open new dialogs).
145
153
  */
146
154
  actionClick: function (action) {
147
155
  if (action) {
148
156
  if (action.type == "Search") {
149
- if (action.nervePath) {
150
- this.openSearch([action.filter], action.label);
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
+ });
151
165
  } else {
152
166
  this.openSearch([], action.term);
153
167
  // GA Tagging
@@ -163,11 +177,29 @@ export default {
163
177
  });
164
178
  this.filterTriggered = true;
165
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
+ }
166
199
  } else if (action.type == "URL") {
167
200
  window.open(action.resource, "_blank");
168
201
  } else if (action.type == "Facet") {
169
202
  if (this.$refs.sideBar) {
170
- this.closeConnectivityInfo();
171
203
  this.$refs.sideBar.addFilter(action);
172
204
  const { facet } = action;
173
205
  // GA Tagging
@@ -189,33 +221,31 @@ export default {
189
221
  facetPropPath: "organisms.primary.species.name",
190
222
  });
191
223
  });
192
- if (facets.length == 0)
193
- facets.push({
194
- facet: "Show All",
195
- term: "Species",
196
- facetPropPath: "organisms.primary.species.name",
197
- });
198
224
  facets.push(
199
225
  ...action.labels.map(val => ({
200
226
  facet: capitalise(val),
201
227
  term: "Anatomical structure",
202
228
  facetPropPath: "anatomy.organ.category.name",
229
+ facetSubPropPath: "anatomy.organ.name",
203
230
  }))
204
231
  );
205
- if (this.$refs.sideBar) {
206
- this.closeConnectivityInfo();
207
- this.$refs.sideBar.openSearch(facets, "");
208
-
209
- const filterValuesArray = intersectArrays(this.availableFacets, action.labels);
210
- const filterValues = filterValuesArray.join(', ');
211
- // GA Tagging
212
- // Event tracking for map action search/filter data
213
- Tagging.sendEvent({
214
- 'event': 'interaction_event',
215
- 'event_name': 'portal_maps_action_filter',
216
- 'category': filterValues || 'filter',
217
- 'location': 'map_popup_button'
218
- });
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
+ }
219
249
  }
220
250
  } else {
221
251
  this.trackGalleryClick(action);
@@ -250,7 +280,7 @@ export default {
250
280
  'file_path': filePath,
251
281
  });
252
282
  },
253
- onDisplaySearch: function (payload) {
283
+ onDisplaySearch: function (payload, tracking = true) {
254
284
  let searchFound = false;
255
285
  //Search all active viewers when global callback is on
256
286
  let splitdialog = this.$refs.splitdialog;
@@ -264,14 +294,16 @@ export default {
264
294
  }
265
295
  this.$refs.dialogToolbar.setFailedSearch(searchFound ? undefined : payload.term);
266
296
 
267
- // GA Tagging
268
- // Event tracking for map on display search
269
- Tagging.sendEvent({
270
- 'event': 'interaction_event',
271
- 'event_name': 'portal_maps_display_search',
272
- 'category': payload.term,
273
- 'location': 'map_toolbar'
274
- });
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
+ }
275
307
  },
276
308
  fetchSuggestions: function(payload) {
277
309
  const suggestions = [];
@@ -306,54 +338,86 @@ export default {
306
338
  offset: activeView === 'singlepanel' || activeView === '2horpanel'
307
339
  });
308
340
  },
309
- onConnectivityComponentClick: function (data) {
310
- EventBus.emit('connectivity-component-click', {
311
- connectivityInfo: this.connectivityInfo,
341
+ onShowReferenceConnectivities: function (refSource) {
342
+ EventBus.emit('show-reference-connectivities', refSource);
343
+ },
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,
312
360
  data: data,
313
361
  });
314
362
  },
363
+ onConnectivitySourceChange: function (data) {
364
+ this.connectivityExplorerClicked = true;
365
+ EventBus.emit('connectivity-source-change', data);
366
+ },
315
367
  hoverChanged: function (data) {
316
- const hoverAnatomies = data && data.anatomy ? data.anatomy : [];
317
- const hoverOrgans = data && data.organs ? data.organs : [];
318
- this.settingsStore.updateHoverFeatures(hoverAnatomies, hoverOrgans);
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);
319
379
  EventBus.emit("hoverUpdate");
320
380
  },
321
381
  searchChanged: function (data) {
322
- if (data && data.type == "query-update") {
323
- this.search = data.value;
324
- if (this.search && !this.filterTriggered) {
325
- // GA Tagging
326
- // Event tracking for map action search/filter data
327
- Tagging.sendEvent({
328
- 'event': 'interaction_event',
329
- 'event_name': 'portal_maps_action_search',
330
- 'category': this.search,
331
- 'location': 'map_sidebar_search'
332
- });
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
333
396
  }
334
- this.filterTriggered = false; // reset for next action
335
- }
336
- if (data && data.type == "filter-update") {
337
- this.settingsStore.updateFacets(data.value);
397
+ if (data && data.type == "filter-update") {
398
+ this.settingsStore.updateFacets(data.value);
338
399
 
339
- // Remove filter event from maps' popup
340
- if (!this.filterTriggered) {
341
- const { value } = data;
342
- const filterValuesArray = value.filter((val) =>
343
- val.facet && val.facet.toLowerCase() !== 'show all'
344
- ).map((val) => val.facet);
345
- const filterValues = filterValuesArray.join(', ');
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(', ');
346
407
 
347
- // GA Tagging
348
- // Event tracking for map action search/filter data
349
- Tagging.sendEvent({
350
- 'event': 'interaction_event',
351
- 'event_name': 'portal_maps_action_filter',
352
- 'category': filterValues || 'filter',
353
- 'location': 'map_sidebar_filter'
354
- });
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
355
418
  }
356
- this.filterTriggered = false; // reset for next action
419
+ } else if (data.id === 2) {
420
+ EventBus.emit("connectivity-query-filter", data);
357
421
  }
358
422
  },
359
423
  updateMarkers: function (data) {
@@ -432,17 +496,17 @@ export default {
432
496
  this.search = query;
433
497
  this._facets = facets;
434
498
  if (this.$refs && this.$refs.sideBar) {
435
- this.closeConnectivityInfo();
436
499
  this.$refs.sideBar.openSearch(facets, query);
500
+ //this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
437
501
  }
438
502
  this.startUp = false;
439
503
  },
440
- closeConnectivityInfo: function() {
441
- // close all opened popups on DOM
442
- const containerEl = this.$el;
443
- containerEl.querySelectorAll('.maplibregl-popup-close-button').forEach((el) => {
444
- el.click();
445
- });
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;
446
510
  },
447
511
  onFullscreen: function (val) {
448
512
  this.$emit("onFullscreen", val);
@@ -492,9 +556,6 @@ export default {
492
556
  this.$refs.sideBar.close();
493
557
  }
494
558
  },
495
- tabClicked: function ({id, type}) {
496
- this.activeDockedId = id;
497
- },
498
559
  toggleSyncMode: function (payload) {
499
560
  if (payload) {
500
561
  if (payload.flag) {
@@ -553,16 +614,18 @@ export default {
553
614
  this.confirmDeleteCallback(payload);
554
615
  }
555
616
  },
556
- onSidebarTabClose: function (id) {
557
- if (id === 2) EventBus.emit('connectivity-info-close');
558
- if (id === 3) EventBus.emit('annotation-close', { tabClose: true });
559
- },
560
- resetActivePathways: function () {
561
- const containerEl = this.$el;
562
- const activeCanvas = containerEl.querySelector('.maplibregl-canvas');
563
- if (activeCanvas) {
564
- activeCanvas.click();
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';
565
623
  }
624
+ this.settingsStore.updateGlobalSettings(globalSettings);
625
+ this.$refs.dialogToolbar.loadGlobalSettings();
626
+ },
627
+ onSidebarTabClosed: function (tab) {
628
+ if (tab.id === 3 && tab.type === "annotation") EventBus.emit('annotation-close');
566
629
  },
567
630
  },
568
631
  created: function () {
@@ -591,29 +654,32 @@ export default {
591
654
  this.cancelCreateCallback = markRaw(payload.cancelCreate);
592
655
  this.confirmDeleteCallback = markRaw(payload.confirmDelete);
593
656
  if (this.$refs.sideBar) {
594
- this.tabClicked({id: 3, type: 'annotation'});
657
+ this.$refs.sideBar.tabClicked({id: 3, type: 'annotation'});
595
658
  this.$refs.sideBar.setDrawerOpen(true);
596
659
  }
597
660
  });
598
- EventBus.on('annotation-close', payload => {
599
- this.tabClicked({id: 1, type: 'search'});
600
- this.annotationEntry = {};
661
+ EventBus.on('annotation-close', () => {
662
+ this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
663
+ this.annotationEntry = [];
601
664
  this.createData = {};
602
665
  if (this.$refs.sideBar) {
603
666
  this.$refs.sideBar.setDrawerOpen(false);
604
667
  }
605
668
  });
606
669
  EventBus.on('connectivity-info-open', payload => {
607
- this.connectivityInfo = payload;
608
- if (this.$refs.sideBar) {
609
- this.tabClicked({id: 2, type: 'connectivity'});
610
- this.$refs.sideBar.setDrawerOpen(true);
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
+ }
611
681
  }
612
- });
613
- EventBus.on('connectivity-info-close', payload => {
614
- this.tabClicked({id: 1, type: 'search'});
615
- this.connectivityInfo = null;
616
- this.resetActivePathways();
682
+ this.connectivityExplorerClicked = false;
617
683
  });
618
684
  EventBus.on('connectivity-graph-error', payload => {
619
685
  if (this.$refs.sideBar) {
@@ -628,6 +694,16 @@ export default {
628
694
  this.$refs.sideBar.close();
629
695
  }
630
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
+ })
631
707
  this.$nextTick(() => {
632
708
  if (this.search === "" && this._facets.length === 0) {
633
709
  if (this.$refs.sideBar) {
@@ -650,7 +726,7 @@ export default {
650
726
  PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi,
651
727
  NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix,
652
728
  ROOT_URL: this.settingsStore.rootUrl,
653
- FLATMAPAPI_LOCATION: this.settingsStore.flatmapAPI2, // temporary
729
+ FLATMAPAPI_LOCATION: this.settingsStore.flatmapAPI,
654
730
  };
655
731
  },
656
732
  entries: function() {
@@ -2,7 +2,7 @@ const initialDefaultState = () => {
2
2
  return {
3
3
  entries: [
4
4
  {
5
- resource: "Human Male",
5
+ resource: "Rat",
6
6
  type: "MultiFlatmap",
7
7
  mode: "main",
8
8
  id: 1,
@@ -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(type, resource);
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', (payload) => {
175
+ EventBus.on('annotation-close', () => {
177
176
  const currentFlatmap = this.$refs.flatmap;
178
- if (payload?.tabClose && currentFlatmap) {
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.mapHoverHighlight(this.$refs.flatmap.mapImp);
185
+ this.cardHoverHighlight();
187
186
  });
188
187
  EventBus.on('show-connectivity', (payload) => {
189
188
  const { featureIds, offset } = payload;
@@ -195,6 +194,12 @@ export default {
195
194
  });
196
195
  }
197
196
  });
197
+ EventBus.on('show-reference-connectivities', (payload) => {
198
+ const currentFlatmap = this.$refs.flatmap;
199
+ if (currentFlatmap) {
200
+ currentFlatmap.showConnectivitiesByReference(payload);
201
+ }
202
+ });
198
203
  },
199
204
  };
200
205
  </script>
@@ -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.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) {
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', (payload) => {
455
- if (payload?.tabClose && this.flatmapReady && this.$refs.multiflatmap) {
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
  }
@@ -471,10 +477,23 @@ export default {
471
477
  }
472
478
  });
473
479
 
474
- EventBus.on('connectivity-component-click', (payload) => {
480
+ EventBus.on('show-reference-connectivities', (payload) => {
481
+ if (this.flatmapReady && this.$refs.multiflatmap) {
482
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
483
+ if (currentFlatmap) {
484
+ currentFlatmap.showConnectivitiesByReference(payload);
485
+ }
486
+ }
487
+ });
488
+
489
+ EventBus.on('connectivity-hovered', (payload) => {
475
490
  this.showConnectivityTooltips(payload);
476
491
  });
477
492
 
493
+ EventBus.on('connectivity-source-change', (payload) => {
494
+ this.changeConnectivitySource(payload);
495
+ });
496
+
478
497
  EventBus.on("markerUpdate", () => {
479
498
  if (this.flatmapReady) {
480
499
  this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
@@ -482,7 +501,15 @@ export default {
482
501
  });
483
502
  EventBus.on("hoverUpdate", () => {
484
503
  if (this.flatmapReady) {
485
- this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
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
+ }
486
513
  }
487
514
  });
488
515
  },
@@ -201,7 +201,7 @@ export default {
201
201
  }
202
202
  },
203
203
  markerLabels: function () {
204
- return this.settingsStore.numberOfDatasetsForFacets;
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.mapHoverHighlight(this.$refs.scaffold);
222
+ this.cardHoverHighlight();
223
223
  }
224
224
  });
225
225
  },