@abi-software/mapintegratedvuer 1.9.1 → 1.9.3-beta.0

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.
@@ -48,7 +48,9 @@ export default {
48
48
  },
49
49
  data: function() {
50
50
  return {
51
- styles: { }
51
+ styles: { },
52
+ query: "",
53
+ filter: [],
52
54
  }
53
55
  },
54
56
  methods: {
@@ -214,11 +216,14 @@ export default {
214
216
  // mix connectivites of available maps
215
217
  if (uuids.length) {
216
218
  this.connectivitiesStore.updateActiveConnectivityKeys(uuids);
219
+
217
220
  const uniqueConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
218
-
219
221
  EventBus.emit("connectivity-knowledge", {
220
222
  data: uniqueConnectivities
221
223
  });
224
+
225
+ const uniqueFilters = this.connectivitiesStore.getUniqueFilterOptionsByKeys;
226
+ EventBus.emit("connectivity-filter-options", uniqueFilters);
222
227
  } else {
223
228
  if (sckanVersion) {
224
229
  EventBus.emit("connectivity-knowledge", {
@@ -230,6 +235,124 @@ export default {
230
235
  }
231
236
  }
232
237
  },
238
+ getSearchedId: function (flatmap, term) {
239
+ let ids = [];
240
+ const searchResult = flatmap.mapImp.search(term);
241
+ const featureIds = searchResult.__featureIds || searchResult.featureIds;
242
+ featureIds.forEach((id) => {
243
+ const annotation = flatmap.mapImp.annotation(id);
244
+ const compareRanges = [
245
+ annotation.id,
246
+ annotation.name,
247
+ annotation.label,
248
+ annotation.models,
249
+ annotation.source
250
+ ];
251
+ const isMatched = compareRanges.some((item) => {
252
+ return item && item.toLowerCase().includes(term.toLowerCase())
253
+ });
254
+ if (isMatched && annotation.models && !ids.includes(annotation.models)) {
255
+ ids.push(annotation.models);
256
+ }
257
+ });
258
+ return ids;
259
+ },
260
+ connectivityQueryFilter: async function (data) {
261
+ const activeContents = this.getActiveContents();
262
+ let searchOrders = [], searchHighlights = [], searchResults = [];
263
+
264
+ for (const activeContent of activeContents) {
265
+ const viewer = activeContent.$refs.viewer;
266
+
267
+ if (viewer) {
268
+ const multiflatmap = viewer.$refs.multiflatmap;
269
+ const flatmap = viewer.$refs.flatmap;
270
+ let currentFlatmap = null;
271
+
272
+ if (multiflatmap) {
273
+ const _currentFlatmap = multiflatmap.getCurrentFlatmap();
274
+ if (_currentFlatmap && _currentFlatmap.mapImp) {
275
+ currentFlatmap = _currentFlatmap;
276
+ }
277
+ }
278
+ if (flatmap && flatmap.mapImp) {
279
+ currentFlatmap = flatmap;
280
+ }
281
+
282
+ const uniqueFilters = this.connectivitiesStore.getUniqueFilterOptionsByKeys;
283
+ const uniqueFilterSources = this.connectivitiesStore.getUniqueFilterSourcesByKeys;
284
+ if (currentFlatmap && currentFlatmap.$el.checkVisibility()) {
285
+ let results = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
286
+ if (data) {
287
+ this.query = data.query;
288
+ let filters = {}
289
+ data.filter.forEach((item) => {
290
+ const facetKey = item.facetPropPath.split('.').pop();;
291
+ if (!(facetKey in filters)) {
292
+ filters[facetKey] = [];
293
+ }
294
+ const matchedFilter = uniqueFilters.find(filter => filter.key.includes(facetKey));
295
+ if (matchedFilter) {
296
+ matchedFilter.children.forEach((child) => {
297
+ if (child.label === item.facet && child.key) {
298
+ const childKey = child.key.split('.').pop();
299
+ filters[facetKey].push(childKey);
300
+ }
301
+ });
302
+ }
303
+ });
304
+ let ids = []
305
+ for (const [key, value] of Object.entries(filters)) {
306
+ value.forEach((v) => ids.push(...uniqueFilterSources[key][v]));
307
+ }
308
+ this.filter = [...new Set(ids)];
309
+ if (data.type === "query-update") {
310
+ this.query = data.value;
311
+ } else if (data.type === "filter-update") {
312
+ this.filter = data.value;
313
+ }
314
+ }
315
+ if (this.query) {
316
+ let options = {};
317
+ const searchTerms = this.query.split(",").map((term) => term.trim());
318
+ const nestedIds = [];
319
+ for (let index = 0; index < searchTerms.length; index++) {
320
+ nestedIds.push(this.getSearchedId(currentFlatmap, searchTerms[index]));
321
+ }
322
+ const ids = [...new Set(nestedIds.flat())];
323
+ searchOrders.push(...ids);
324
+ const paths = await currentFlatmap.retrieveConnectedPaths(ids, options);
325
+ searchHighlights.push(...paths);
326
+ results = results.filter((item) => paths.includes(item.id));
327
+ }
328
+ if (this.filter.length) {
329
+ searchHighlights.push(...this.filter);
330
+ results = results.filter((item) => this.filter.includes(item.id));
331
+ }
332
+ searchResults.push(...results);
333
+ }
334
+ }
335
+ }
336
+
337
+ const uniqueOrders = [...new Set(searchOrders)];
338
+ const uniqueHighlights = [...new Set(searchHighlights)];
339
+ let uniqueResults = Array.from(
340
+ new Map(searchResults.map((item) => [item.id, item])).values()
341
+ );
342
+ // Ensure that the results always show search items first
343
+ // and the rest ordered by alphabetical order
344
+ uniqueResults = [
345
+ ...uniqueResults.filter((r) => uniqueOrders.includes(r.id)),
346
+ ...uniqueResults.filter((r) => !uniqueOrders.includes(r.id))
347
+ ];
348
+
349
+ const connectivitiesPayload = {
350
+ highlight: uniqueHighlights,
351
+ data: uniqueResults,
352
+ };
353
+
354
+ EventBus.emit("connectivity-knowledge", connectivitiesPayload);
355
+ },
233
356
  },
234
357
  computed: {
235
358
  ...mapStores(useSplitFlowStore, useConnectivitiesStore),
@@ -287,6 +410,9 @@ export default {
287
410
  EventBus.on('species-layout-connectivity-update', () => {
288
411
  this.onSpeciesLayoutConnectivityUpdate();
289
412
  })
413
+ EventBus.on("connectivity-query-filter", (payload) => {
414
+ this.connectivityQueryFilter(payload);
415
+ });
290
416
  },
291
417
  };
292
418
  </script>
@@ -28,6 +28,7 @@
28
28
  :createData="createData"
29
29
  :connectivityEntry="connectivityEntry"
30
30
  :connectivityKnowledge="connectivityKnowledge"
31
+ :filterOptions="filterOptions"
31
32
  @tabClicked="onSidebarTabClicked"
32
33
  @tabClosed="onSidebarTabClosed"
33
34
  @actionClick="actionClick"
@@ -44,8 +45,9 @@
44
45
  @show-connectivity="onShowConnectivity"
45
46
  @show-reference-connectivities="onShowReferenceConnectivities"
46
47
  @connectivity-hovered="onConnectivityHovered"
47
- @connectivity-explorer-clicked="onConnectivityExplorerClicked"
48
+ @connectivity-collapse-change="onConnectivityCollapseChange"
48
49
  @connectivity-source-change="onConnectivitySourceChange"
50
+ @connectivity-item-close="onConnectivityItemClose"
49
51
  />
50
52
  <SplitDialog
51
53
  :entries="entries"
@@ -118,6 +120,7 @@ export default {
118
120
  sideBarVisibility: true,
119
121
  startUp: true,
120
122
  search: '',
123
+ expanded: '',
121
124
  filterTriggered: false,
122
125
  availableFacets: [],
123
126
  connectivityEntry: [],
@@ -131,6 +134,7 @@ export default {
131
134
  connectivityHighlight: [],
132
135
  connectivityKnowledge: [],
133
136
  connectivityExplorerClicked: [], // to support multi views
137
+ filterOptions: [],
134
138
  }
135
139
  },
136
140
  watch: {
@@ -139,15 +143,25 @@ export default {
139
143
  if (value) {
140
144
  if (!this._externalStateSet) this.setState(value);
141
145
  this._externalStateSet = true;
146
+ this.updateGlobalSettingsFromState(value);
142
147
  }
143
148
  },
144
149
  immediate: true,
145
150
  },
151
+ connectivityHighlight: {
152
+ handler: function () {
153
+ this.hoverChanged({ tabType: 'connectivity' });
154
+ },
155
+ },
146
156
  },
147
157
  methods: {
148
- onConnectivityExplorerClicked: function (payload) {
158
+ onConnectivityCollapseChange: function (payload) {
159
+ this.expanded = payload.id
149
160
  this.onDisplaySearch({ term: payload.id }, false, true);
150
161
  },
162
+ onConnectivityItemClose: function () {
163
+ EventBus.emit('connectivity-item-close');
164
+ },
151
165
  /**
152
166
  * Callback when an action is performed (open new dialogs).
153
167
  */
@@ -301,13 +315,15 @@ export default {
301
315
  * @arg featureIds
302
316
  */
303
317
  onShowConnectivity: function (featureIds) {
304
- const splitFlowState = this.splitFlowStore.getState();
305
- const activeView = splitFlowState?.activeView || '';
306
- // offset sidebar only on singlepanel and 2horpanel views
307
- EventBus.emit('show-connectivity', {
308
- featureIds: featureIds,
309
- offset: activeView === 'singlepanel' || activeView === '2horpanel'
310
- });
318
+ if (featureIds.length) {
319
+ const splitFlowState = this.splitFlowStore.getState();
320
+ const activeView = splitFlowState?.activeView || '';
321
+ // offset sidebar only on singlepanel and 2horpanel views
322
+ EventBus.emit('show-connectivity', {
323
+ featureIds: featureIds,
324
+ offset: activeView === 'singlepanel' || activeView === '2horpanel'
325
+ });
326
+ }
311
327
  },
312
328
  onShowReferenceConnectivities: function (refSource) {
313
329
  EventBus.emit('show-reference-connectivities', refSource);
@@ -321,22 +337,18 @@ export default {
321
337
  },
322
338
  hoverChanged: function (data) {
323
339
  let hoverAnatomies = [], hoverOrgans = [], hoverDOI = '', hoverConnectivity = [];
324
- if (data) {
325
- if (data.type === 'dataset') {
326
- hoverAnatomies = data.anatomy ? data.anatomy : [];
327
- hoverOrgans = data.organs ? data.organs : [];
328
- hoverDOI = data.doi ? data.doi : '';
329
- } else if (data.type === 'connectivity') {
330
- hoverConnectivity = data.id ? [data.id] : [];
331
- }
332
- } else {
333
- hoverConnectivity = this.connectivityHighlight;
340
+ if (data.tabType === 'dataset') {
341
+ hoverAnatomies = data.anatomy ? data.anatomy : [];
342
+ hoverOrgans = data.organs ? data.organs : [];
343
+ hoverDOI = data.doi ? data.doi : '';
344
+ } else if (data.tabType === 'connectivity') {
345
+ hoverConnectivity = data.id ? [data.id] : this.connectivityHighlight;
334
346
  }
335
347
  this.settingsStore.updateHoverFeatures(hoverAnatomies, hoverOrgans, hoverDOI, hoverConnectivity);
336
348
  EventBus.emit("hoverUpdate");
337
349
  },
338
350
  searchChanged: function (data) {
339
- if (data.id === 1) {
351
+ if (data.tabType === 'dataset') {
340
352
  if (data && data.type == "query-update") {
341
353
  this.search = data.value;
342
354
  if (this.search && !this.filterTriggered) {
@@ -373,7 +385,8 @@ export default {
373
385
  }
374
386
  this.filterTriggered = false; // reset for next action
375
387
  }
376
- } else if (data.id === 2) {
388
+ } else if (data.tabType === 'connectivity') {
389
+ this.expanded = '';
377
390
  this.connectivityEntry = [];
378
391
  EventBus.emit("connectivity-query-filter", data);
379
392
  }
@@ -515,7 +528,6 @@ export default {
515
528
  // Use to update the connectivity when switch species
516
529
  // Wait for provenance info with uuid update
517
530
  this.$nextTick(() => {
518
- // EventBus.emit("connectivity-query-filter");
519
531
  EventBus.emit('species-layout-connectivity-update');
520
532
  this.$refs.sideBar.close();
521
533
  })
@@ -583,17 +595,52 @@ export default {
583
595
  },
584
596
  onSidebarTabClicked: function (tab) {
585
597
  let globalSettings = { ...this.settingsStore.globalSettings };
586
- if (tab.id === 1 && tab.type === 'datasetExplorer') {
587
- globalSettings.interactiveMode = 'dataset';
588
- } else if (tab.id === 2 && tab.type === 'connectivityExplorer') {
589
- globalSettings.interactiveMode = 'connectivity';
598
+
599
+ if ('interactiveMode' in globalSettings) {
600
+ if (tab.id === 1 && tab.type === 'datasetExplorer') {
601
+ globalSettings.interactiveMode = 'dataset';
602
+ } else if (tab.id === 2 && tab.type === 'connectivityExplorer') {
603
+ globalSettings.interactiveMode = 'connectivity';
604
+ }
605
+ this.settingsStore.updateGlobalSettings(globalSettings);
590
606
  }
591
- this.settingsStore.updateGlobalSettings(globalSettings);
607
+
592
608
  this.$refs.dialogToolbar.loadGlobalSettings();
593
609
  },
594
610
  onSidebarTabClosed: function (tab) {
595
611
  if (tab.id === 3 && tab.type === "annotation") EventBus.emit('annotation-close');
596
612
  },
613
+ updateGlobalSettingsFromStorage: function () {
614
+ const globalSettingsFromStorage = localStorage.getItem('mapviewer.globalSettings');
615
+ if (globalSettingsFromStorage) {
616
+ this.settingsStore.updateGlobalSettings(JSON.parse(globalSettingsFromStorage));
617
+ }
618
+ },
619
+ updateGlobalSettingsFromState: function (state) {
620
+ let mappedSettings = null;
621
+ state.entries.forEach((entry) => {
622
+ if (entry.state?.state) {
623
+ const {
624
+ background,
625
+ colour,
626
+ flightPath3D,
627
+ outlines,
628
+ viewingMode
629
+ } = entry.state.state;
630
+
631
+ mappedSettings = {
632
+ viewingMode: viewingMode,
633
+ flightPathDisplay: flightPath3D,
634
+ organsDisplay: colour,
635
+ outlinesDisplay: outlines,
636
+ backgroundDisplay: background,
637
+ };
638
+ }
639
+ })
640
+ if (mappedSettings) {
641
+ this.settingsStore.updateGlobalSettings(mappedSettings);
642
+ }
643
+ },
597
644
  },
598
645
  created: function () {
599
646
  this._facets = [];
@@ -617,41 +664,77 @@ export default {
617
664
  } else {
618
665
  this.createData = markRaw(payload.createData);
619
666
  }
620
- this.confirmCreateCallback = markRaw(payload.confirmCreate);
621
- this.cancelCreateCallback = markRaw(payload.cancelCreate);
622
- this.confirmDeleteCallback = markRaw(payload.confirmDelete);
623
- this.confirmCommentCallback = markRaw(payload.confirmComment);
667
+ if (payload.confirmCreate) {
668
+ this.confirmCreateCallback = markRaw(payload.confirmCreate);
669
+ }
670
+ if (payload.cancelCreate) {
671
+ this.cancelCreateCallback = markRaw(payload.cancelCreate);
672
+ }
673
+ if (payload.confirmDelete) {
674
+ this.confirmDeleteCallback = markRaw(payload.confirmDelete);
675
+ }
676
+ if (payload.confirmComment) {
677
+ this.confirmCommentCallback = markRaw(payload.confirmComment);
678
+ }
624
679
  if (this.$refs.sideBar) {
625
680
  this.$refs.sideBar.tabClicked({id: 3, type: 'annotation'});
626
681
  this.$refs.sideBar.setDrawerOpen(true);
627
682
  }
628
683
  });
629
684
  EventBus.on('annotation-close', () => {
630
- this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
685
+ const globalSettings = { ...this.settingsStore.globalSettings };
686
+ const { interactiveMode, viewingMode } = globalSettings;
687
+
631
688
  this.annotationEntry = [];
632
689
  this.createData = {};
690
+
633
691
  if (this.$refs.sideBar) {
634
- this.$refs.sideBar.setDrawerOpen(false);
692
+ if (interactiveMode === "dataset") {
693
+ this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
694
+ } else if (interactiveMode === "connectivity") {
695
+ this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
696
+ }
697
+
698
+ if (viewingMode === 'Annotation') {
699
+ this.$refs.sideBar.setDrawerOpen(false);
700
+ }
701
+
702
+ this.$refs.sideBar.closeConnectivity();
703
+ EventBus.emit('connectivity-item-close');
635
704
  }
636
705
  });
706
+ EventBus.on('update-offline-annotation-enabled', (payload) => {
707
+ this.settingsStore.updateOfflineAnnotationEnabled(payload);
708
+ });
637
709
  EventBus.on('connectivity-info-open', payload => {
638
- this.connectivityEntry = payload;
639
- // click on the flatmap paths/features directly
640
- // or onDisplaySearch is performed
641
- if (!this.connectivityExplorerClicked.length) {
642
- this.connectivityKnowledge = payload.map((entry) => {
643
- return { label: entry.title, id: entry.featureId[0], detailsReady: entry.ready }
644
- });
645
- if (this.connectivityKnowledge.every(conn => conn.detailsReady)) {
646
- this.connectivityHighlight = this.connectivityKnowledge.map(conn => conn.id);
647
- this.onShowConnectivity(this.connectivityHighlight);
710
+ // expand connectivity card and show connectivity info
711
+ // if expanded exist, payload should be an array of one element
712
+ // skip payload not match the expanded in multiple views
713
+ const isMatched = payload.some(entry => entry.featureId[0] === this.expanded);
714
+ if (this.expanded && this.connectivityExplorerClicked.length && !isMatched) {
715
+ this.connectivityExplorerClicked.pop();
716
+ return;
717
+ }
718
+ this.connectivityEntry = payload.map(entry => {
719
+ return { ...entry, label: entry.title, id: entry.featureId[0] };
720
+ });
721
+ if (this.connectivityExplorerClicked.length) {
722
+ // only remove clicked if not placeholder entry
723
+ if (this.connectivityEntry.every(entry => entry.ready)) {
724
+ this.connectivityExplorerClicked.pop();
725
+ }
726
+ } else {
727
+ // click on the flatmap paths/features directly
728
+ // or onDisplaySearch is performed
729
+ this.connectivityKnowledge = this.connectivityEntry;
730
+ if (this.connectivityKnowledge.every(ck => ck.ready)) {
731
+ this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id);
648
732
  }
649
733
  if (this.$refs.sideBar) {
650
- this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
734
+ this.$refs.sideBar.tabClicked({ id: 2, type: 'connectivityExplorer' });
651
735
  this.$refs.sideBar.setDrawerOpen(true);
652
736
  }
653
737
  }
654
- this.connectivityExplorerClicked.pop();
655
738
  });
656
739
  EventBus.on('connectivity-info-close', payload => {
657
740
  if (this.$refs.sideBar) {
@@ -673,13 +756,7 @@ export default {
673
756
  });
674
757
  EventBus.on("connectivity-knowledge", payload => {
675
758
  this.connectivityKnowledge = payload.data;
676
- this.connectivityHighlight = [];
677
- if (payload.state === "processed") {
678
- this.connectivityHighlight = this.connectivityKnowledge.map(conn => conn.id);;
679
- this.onShowConnectivity(this.connectivityHighlight);
680
- } else {
681
- this.hoverChanged();
682
- }
759
+ this.connectivityHighlight = payload.highlight || [];
683
760
  })
684
761
  EventBus.on("modeUpdate", payload => {
685
762
  if (payload === "dataset") {
@@ -688,6 +765,10 @@ export default {
688
765
  this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
689
766
  }
690
767
  })
768
+ this.updateGlobalSettingsFromStorage();
769
+ EventBus.on("connectivity-filter-options", payload => {
770
+ this.filterOptions = payload;
771
+ })
691
772
  this.$nextTick(() => {
692
773
  if (this.search === "" && this._facets.length === 0) {
693
774
  if (this.$refs.sideBar) {
@@ -18,10 +18,12 @@
18
18
  @shown-map-tooltip="onMapTooltipShown"
19
19
  @annotation-open="onAnnotationOpen"
20
20
  @annotation-close="onAnnotationClose"
21
+ @update-offline-annotation-enabled="updateOfflineAnnotationEnabled"
21
22
  :annotationSidebar="annotationSidebar"
22
23
  @connectivity-info-open="onConnectivityInfoOpen"
23
24
  @connectivity-error="onConnectivityError"
24
25
  @connectivity-info-close="onConnectivityInfoClose"
26
+ :connectivityInfoSidebar="connectivityInfoSidebar"
25
27
  :pathControls="true"
26
28
  ref="flatmap"
27
29
  @ready="flatmapReadyCall"
@@ -30,6 +32,8 @@
30
32
  :enableOpenMapUI="true"
31
33
  :flatmapAPI="flatmapAPI"
32
34
  :sparcAPI="apiLocation"
35
+ :showLocalSettings="showLocalSettings"
36
+ :showOpenMapButton="showOpenMapButton"
33
37
  @open-map="openMap"
34
38
  @pathway-selection-changed="onPathwaySelectionChanged"
35
39
  @mapmanager-loaded="onMapmanagerLoaded"
@@ -106,7 +110,8 @@ export default {
106
110
  EventBus.emit("mapImpProv", provClone); // send clone to context card
107
111
  this.$emit("flatmap-provenance-ready", provClone);
108
112
  this.flatmapReadyForMarkerUpdates(flatmap);
109
- this.loadConnectivityKnowledge(flatmapImp);
113
+ this.updateSettings();
114
+ this.loadConnectivityExplorerConfig(flatmap);
110
115
  EventBus.emit("mapLoaded", flatmap);
111
116
  },
112
117
  onPathwaySelectionChanged: function (data) {
@@ -167,6 +172,23 @@ export default {
167
172
  changeViewingMode: function (modeName) {
168
173
  this.$refs.flatmap.changeViewingMode(modeName);
169
174
  },
175
+ updateSettings: function () {
176
+ const {
177
+ backgroundDisplay,
178
+ viewingMode,
179
+ flightPathDisplay,
180
+ organsDisplay,
181
+ outlines,
182
+ } = this.settingsStore.globalSettings;
183
+
184
+ const currentFlatmap = this.$refs.flatmap;
185
+
186
+ currentFlatmap.changeViewingMode(viewingMode);
187
+ currentFlatmap.setFlightPath3D(flightPathDisplay);
188
+ currentFlatmap.setColour(organsDisplay);
189
+ currentFlatmap.setOutlines(outlines);
190
+ currentFlatmap.backgroundChangeCallback(backgroundDisplay);
191
+ },
170
192
  },
171
193
  computed: {
172
194
  facetSpecies() {
@@ -186,6 +208,21 @@ export default {
186
208
  EventBus.on("hoverUpdate", () => {
187
209
  this.cardHoverHighlight();
188
210
  });
211
+ EventBus.on('viewingModeUpdate', (payload) => {
212
+ this.$refs.flatmap.changeViewingMode(payload);
213
+ });
214
+ EventBus.on('flightPathUpdate', (payload) => {
215
+ this.$refs.flatmap.setFlightPath3D(payload);
216
+ });
217
+ EventBus.on('organsDisplayUpdate', (payload) => {
218
+ this.$refs.flatmap.setColour(payload);
219
+ });
220
+ EventBus.on('outlinesDisplayUpdate', (payload) => {
221
+ this.$refs.flatmap.setOutlines(payload);
222
+ });
223
+ EventBus.on('backgroundDisplayUpdate', (payload) => {
224
+ this.$refs.flatmap.backgroundChangeCallback(payload);
225
+ });
189
226
  EventBus.on('show-connectivity', (payload) => {
190
227
  const { featureIds, offset } = payload;
191
228
  const currentFlatmap = this.$refs.flatmap;
@@ -202,12 +239,6 @@ export default {
202
239
  currentFlatmap.showConnectivitiesByReference(payload);
203
240
  }
204
241
  });
205
- EventBus.on("connectivity-query-filter", (payload) => {
206
- const currentFlatmap = this.$refs.flatmap;
207
- if (currentFlatmap && currentFlatmap.mapImp) {
208
- this.connectivityQueryFilter(currentFlatmap, payload)
209
- }
210
- });
211
242
  },
212
243
  };
213
244
  </script>
@@ -17,6 +17,7 @@
17
17
  @shown-map-tooltip="onMapTooltipShown"
18
18
  @annotation-open="onAnnotationOpen"
19
19
  @annotation-close="onAnnotationClose"
20
+ @update-offline-annotation-enabled="updateOfflineAnnotationEnabled"
20
21
  :annotationSidebar="annotationSidebar"
21
22
  @connectivity-info-open="onConnectivityInfoOpen"
22
23
  @connectivity-error="onConnectivityError"
@@ -29,12 +30,15 @@
29
30
  :openMapOptions="openMapOptions"
30
31
  :flatmapAPI="flatmapAPI"
31
32
  :sparcAPI="apiLocation"
33
+ :showLocalSettings="showLocalSettings"
34
+ :showOpenMapButton="showOpenMapButton"
32
35
  @pan-zoom-callback="flatmapPanZoomCallback"
33
36
  @open-map="openMap"
34
37
  @finish-help-mode="endHelp"
35
38
  @pathway-selection-changed="onPathwaySelectionChanged"
36
39
  @open-pubmed-url="onOpenPubmedUrl"
37
40
  @mapmanager-loaded="onMapmanagerLoaded"
41
+ :showPathwayFilter="false"
38
42
  />
39
43
 
40
44
  <HelpModeDialog
@@ -337,7 +341,8 @@ export default {
337
341
  const flatmapImp = flatmap.mapImp;
338
342
  this.flatmapMarkerUpdate(flatmapImp);
339
343
  this.updateProvCard();
340
- this.loadConnectivityKnowledge(flatmapImp);
344
+ this.updateSettings();
345
+ this.loadConnectivityExplorerConfig(flatmap);
341
346
  EventBus.emit("mapLoaded", flatmap);
342
347
  }
343
348
  },
@@ -433,6 +438,25 @@ export default {
433
438
  flatmap.changeConnectivitySource(payload);
434
439
  }
435
440
  },
441
+ updateSettings: function () {
442
+ const {
443
+ backgroundDisplay,
444
+ viewingMode,
445
+ flightPathDisplay,
446
+ organsDisplay,
447
+ outlines,
448
+ } = this.settingsStore.globalSettings;
449
+
450
+ if (this.flatmapReady) {
451
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
452
+
453
+ currentFlatmap.changeViewingMode(viewingMode);
454
+ currentFlatmap.setFlightPath3D(flightPathDisplay);
455
+ currentFlatmap.setColour(organsDisplay);
456
+ currentFlatmap.setOutlines(outlines);
457
+ currentFlatmap.backgroundChangeCallback(backgroundDisplay);
458
+ }
459
+ },
436
460
  },
437
461
  computed: {
438
462
  facetSpecies() {
@@ -505,12 +529,34 @@ export default {
505
529
  this.cardHoverHighlight();
506
530
  }
507
531
  });
508
- EventBus.on("connectivity-query-filter", (payload) => {
509
- if (this.flatmapReady && this.$refs.multiflatmap) {
532
+ EventBus.on('viewingModeUpdate', (payload) => {
533
+ if (this.flatmapReady) {
510
534
  const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
511
- if (currentFlatmap && currentFlatmap.mapImp) {
512
- this.connectivityQueryFilter(currentFlatmap, payload)
513
- }
535
+ currentFlatmap.changeViewingMode(payload);
536
+ }
537
+ });
538
+ EventBus.on('flightPathUpdate', (payload) => {
539
+ if (this.flatmapReady) {
540
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
541
+ currentFlatmap.setFlightPath3D(payload);
542
+ }
543
+ });
544
+ EventBus.on('organsDisplayUpdate', (payload) => {
545
+ if (this.flatmapReady) {
546
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
547
+ currentFlatmap.setColour(payload);
548
+ }
549
+ });
550
+ EventBus.on('outlinesDisplayUpdate', (payload) => {
551
+ if (this.flatmapReady) {
552
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
553
+ currentFlatmap.setOutlines(payload);
554
+ }
555
+ });
556
+ EventBus.on('backgroundDisplayUpdate', (payload) => {
557
+ if (this.flatmapReady) {
558
+ const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
559
+ currentFlatmap.backgroundChangeCallback(payload);
514
560
  }
515
561
  });
516
562
  },