@abi-software/mapintegratedvuer 1.9.2 → 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.
- package/dist/{ContentMixin-DO6jlHIh.js → ContentMixin-W2PTyJZz.js} +162 -156
- package/dist/{Flatmap-CY9MPW7I.js → Flatmap--SlRCdfI.js} +70 -47
- package/dist/{Iframe-XTSWvVQw.js → Iframe-DYGGdodq.js} +2 -2
- package/dist/{MultiFlatmap-B7e2d6WK.js → MultiFlatmap-CEimf8Pc.js} +50 -22
- package/dist/{Plot-D3lEgm6I.js → Plot-x7fR8yUx.js} +2 -2
- package/dist/Scaffold-CfDMtWBm.js +194 -0
- package/dist/{Simulation-CrPJ4_pw.js → Simulation-BOhCaUMa.js} +2 -2
- package/dist/{index-BcpVBq1h.js → index-DMpfPm6s.js} +19969 -20101
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +226 -6059
- package/dist/style-Ba4Y-S47.js +66 -0
- package/dist/style.css +1 -1
- package/package.json +6 -5
- package/src/App.vue +2 -0
- package/src/assets/header-icon.scss +2 -2
- package/src/components/DialogToolbarContent.vue +434 -18
- package/src/components/MapContent.vue +24 -2
- package/src/components/SplitDialog.vue +63 -31
- package/src/components/SplitFlow.vue +131 -60
- package/src/components/viewers/Flatmap.vue +37 -1
- package/src/components/viewers/MultiFlatmap.vue +55 -1
- package/src/components/viewers/Scaffold.vue +19 -0
- package/src/components.d.ts +9 -0
- package/src/mixins/ContentMixin.js +44 -23
- package/src/stores/connectivities.js +59 -11
- package/src/stores/settings.js +15 -4
- package/vite.bundle-build.js +5 -2
- package/dist/Scaffold-2Zg19azr.js +0 -43337
- package/dist/style-CIceSTeY.js +0 -104700
@@ -51,7 +51,6 @@ export default {
|
|
51
51
|
styles: { },
|
52
52
|
query: "",
|
53
53
|
filter: [],
|
54
|
-
target: [],
|
55
54
|
}
|
56
55
|
},
|
57
56
|
methods: {
|
@@ -217,11 +216,14 @@ export default {
|
|
217
216
|
// mix connectivites of available maps
|
218
217
|
if (uuids.length) {
|
219
218
|
this.connectivitiesStore.updateActiveConnectivityKeys(uuids);
|
219
|
+
|
220
220
|
const uniqueConnectivities = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
|
221
|
-
|
222
221
|
EventBus.emit("connectivity-knowledge", {
|
223
222
|
data: uniqueConnectivities
|
224
223
|
});
|
224
|
+
|
225
|
+
const uniqueFilters = this.connectivitiesStore.getUniqueFilterOptionsByKeys;
|
226
|
+
EventBus.emit("connectivity-filter-options", uniqueFilters);
|
225
227
|
} else {
|
226
228
|
if (sckanVersion) {
|
227
229
|
EventBus.emit("connectivity-knowledge", {
|
@@ -239,10 +241,17 @@ export default {
|
|
239
241
|
const featureIds = searchResult.__featureIds || searchResult.featureIds;
|
240
242
|
featureIds.forEach((id) => {
|
241
243
|
const annotation = flatmap.mapImp.annotation(id);
|
242
|
-
|
243
|
-
annotation.
|
244
|
-
annotation.
|
245
|
-
|
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)) {
|
246
255
|
ids.push(annotation.models);
|
247
256
|
}
|
248
257
|
});
|
@@ -250,8 +259,7 @@ export default {
|
|
250
259
|
},
|
251
260
|
connectivityQueryFilter: async function (data) {
|
252
261
|
const activeContents = this.getActiveContents();
|
253
|
-
let searchResults = [];
|
254
|
-
let searchState = '';
|
262
|
+
let searchOrders = [], searchHighlights = [], searchResults = [];
|
255
263
|
|
256
264
|
for (const activeContent of activeContents) {
|
257
265
|
const viewer = activeContent.$refs.viewer;
|
@@ -267,55 +275,79 @@ export default {
|
|
267
275
|
currentFlatmap = _currentFlatmap;
|
268
276
|
}
|
269
277
|
}
|
270
|
-
|
271
278
|
if (flatmap && flatmap.mapImp) {
|
272
279
|
currentFlatmap = flatmap;
|
273
280
|
}
|
274
281
|
|
275
|
-
const
|
276
|
-
|
282
|
+
const uniqueFilters = this.connectivitiesStore.getUniqueFilterOptionsByKeys;
|
283
|
+
const uniqueFilterSources = this.connectivitiesStore.getUniqueFilterSourcesByKeys;
|
277
284
|
if (currentFlatmap && currentFlatmap.$el.checkVisibility()) {
|
278
|
-
let
|
279
|
-
state: "default",
|
280
|
-
data: [...uniqueConnectivities],
|
281
|
-
};
|
282
|
-
|
285
|
+
let results = this.connectivitiesStore.getUniqueConnectivitiesByKeys;
|
283
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)];
|
284
309
|
if (data.type === "query-update") {
|
285
|
-
if (this.query !== data.value) this.target = [];
|
286
310
|
this.query = data.value;
|
287
311
|
} else if (data.type === "filter-update") {
|
288
312
|
this.filter = data.value;
|
289
313
|
}
|
290
314
|
}
|
291
|
-
|
292
315
|
if (this.query) {
|
293
|
-
|
294
|
-
let prom1 = [], options = {};
|
316
|
+
let options = {};
|
295
317
|
const searchTerms = this.query.split(",").map((term) => term.trim());
|
318
|
+
const nestedIds = [];
|
296
319
|
for (let index = 0; index < searchTerms.length; index++) {
|
297
|
-
|
320
|
+
nestedIds.push(this.getSearchedId(currentFlatmap, searchTerms[index]));
|
298
321
|
}
|
299
|
-
const nestedIds = await Promise.all(prom1);
|
300
322
|
const ids = [...new Set(nestedIds.flat())];
|
301
|
-
|
302
|
-
paths =
|
303
|
-
|
304
|
-
|
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));
|
305
327
|
}
|
306
|
-
|
307
|
-
|
308
|
-
|
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);
|
309
333
|
}
|
310
334
|
}
|
311
335
|
}
|
312
336
|
|
313
|
-
const
|
337
|
+
const uniqueOrders = [...new Set(searchOrders)];
|
338
|
+
const uniqueHighlights = [...new Set(searchHighlights)];
|
339
|
+
let uniqueResults = Array.from(
|
314
340
|
new Map(searchResults.map((item) => [item.id, item])).values()
|
315
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
|
+
];
|
316
348
|
|
317
349
|
const connectivitiesPayload = {
|
318
|
-
|
350
|
+
highlight: uniqueHighlights,
|
319
351
|
data: uniqueResults,
|
320
352
|
};
|
321
353
|
|
@@ -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-
|
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,16 +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
|
-
|
149
|
-
this.
|
158
|
+
onConnectivityCollapseChange: function (payload) {
|
159
|
+
this.expanded = payload.id
|
150
160
|
this.onDisplaySearch({ term: payload.id }, false, true);
|
151
161
|
},
|
162
|
+
onConnectivityItemClose: function () {
|
163
|
+
EventBus.emit('connectivity-item-close');
|
164
|
+
},
|
152
165
|
/**
|
153
166
|
* Callback when an action is performed (open new dialogs).
|
154
167
|
*/
|
@@ -302,13 +315,15 @@ export default {
|
|
302
315
|
* @arg featureIds
|
303
316
|
*/
|
304
317
|
onShowConnectivity: function (featureIds) {
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
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
|
+
}
|
312
327
|
},
|
313
328
|
onShowReferenceConnectivities: function (refSource) {
|
314
329
|
EventBus.emit('show-reference-connectivities', refSource);
|
@@ -322,22 +337,18 @@ export default {
|
|
322
337
|
},
|
323
338
|
hoverChanged: function (data) {
|
324
339
|
let hoverAnatomies = [], hoverOrgans = [], hoverDOI = '', hoverConnectivity = [];
|
325
|
-
if (data) {
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
hoverConnectivity = data.id ? [data.id] : [];
|
332
|
-
}
|
333
|
-
} else {
|
334
|
-
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;
|
335
346
|
}
|
336
347
|
this.settingsStore.updateHoverFeatures(hoverAnatomies, hoverOrgans, hoverDOI, hoverConnectivity);
|
337
348
|
EventBus.emit("hoverUpdate");
|
338
349
|
},
|
339
350
|
searchChanged: function (data) {
|
340
|
-
if (data.
|
351
|
+
if (data.tabType === 'dataset') {
|
341
352
|
if (data && data.type == "query-update") {
|
342
353
|
this.search = data.value;
|
343
354
|
if (this.search && !this.filterTriggered) {
|
@@ -374,8 +385,8 @@ export default {
|
|
374
385
|
}
|
375
386
|
this.filterTriggered = false; // reset for next action
|
376
387
|
}
|
377
|
-
} else if (data.
|
378
|
-
this.
|
388
|
+
} else if (data.tabType === 'connectivity') {
|
389
|
+
this.expanded = '';
|
379
390
|
this.connectivityEntry = [];
|
380
391
|
EventBus.emit("connectivity-query-filter", data);
|
381
392
|
}
|
@@ -517,7 +528,6 @@ export default {
|
|
517
528
|
// Use to update the connectivity when switch species
|
518
529
|
// Wait for provenance info with uuid update
|
519
530
|
this.$nextTick(() => {
|
520
|
-
// EventBus.emit("connectivity-query-filter");
|
521
531
|
EventBus.emit('species-layout-connectivity-update');
|
522
532
|
this.$refs.sideBar.close();
|
523
533
|
})
|
@@ -585,17 +595,52 @@ export default {
|
|
585
595
|
},
|
586
596
|
onSidebarTabClicked: function (tab) {
|
587
597
|
let globalSettings = { ...this.settingsStore.globalSettings };
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
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);
|
592
606
|
}
|
593
|
-
|
607
|
+
|
594
608
|
this.$refs.dialogToolbar.loadGlobalSettings();
|
595
609
|
},
|
596
610
|
onSidebarTabClosed: function (tab) {
|
597
611
|
if (tab.id === 3 && tab.type === "annotation") EventBus.emit('annotation-close');
|
598
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
|
+
},
|
599
644
|
},
|
600
645
|
created: function () {
|
601
646
|
this._facets = [];
|
@@ -619,49 +664,77 @@ export default {
|
|
619
664
|
} else {
|
620
665
|
this.createData = markRaw(payload.createData);
|
621
666
|
}
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
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
|
+
}
|
626
679
|
if (this.$refs.sideBar) {
|
627
680
|
this.$refs.sideBar.tabClicked({id: 3, type: 'annotation'});
|
628
681
|
this.$refs.sideBar.setDrawerOpen(true);
|
629
682
|
}
|
630
683
|
});
|
631
684
|
EventBus.on('annotation-close', () => {
|
632
|
-
this
|
685
|
+
const globalSettings = { ...this.settingsStore.globalSettings };
|
686
|
+
const { interactiveMode, viewingMode } = globalSettings;
|
687
|
+
|
633
688
|
this.annotationEntry = [];
|
634
689
|
this.createData = {};
|
690
|
+
|
635
691
|
if (this.$refs.sideBar) {
|
636
|
-
|
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');
|
637
704
|
}
|
638
705
|
});
|
706
|
+
EventBus.on('update-offline-annotation-enabled', (payload) => {
|
707
|
+
this.settingsStore.updateOfflineAnnotationEnabled(payload);
|
708
|
+
});
|
639
709
|
EventBus.on('connectivity-info-open', payload => {
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
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();
|
647
725
|
}
|
648
|
-
}
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
this.connectivityKnowledge
|
653
|
-
|
654
|
-
});
|
655
|
-
if (this.connectivityKnowledge.every(conn => conn.detailsReady)) {
|
656
|
-
this.connectivityHighlight = this.connectivityKnowledge.map(conn => conn.id);
|
657
|
-
this.onShowConnectivity(this.connectivityHighlight);
|
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);
|
658
732
|
}
|
659
733
|
if (this.$refs.sideBar) {
|
660
734
|
this.$refs.sideBar.tabClicked({ id: 2, type: 'connectivityExplorer' });
|
661
735
|
this.$refs.sideBar.setDrawerOpen(true);
|
662
736
|
}
|
663
737
|
}
|
664
|
-
this.connectivityExplorerClicked.pop();
|
665
738
|
});
|
666
739
|
EventBus.on('connectivity-info-close', payload => {
|
667
740
|
if (this.$refs.sideBar) {
|
@@ -683,13 +756,7 @@ export default {
|
|
683
756
|
});
|
684
757
|
EventBus.on("connectivity-knowledge", payload => {
|
685
758
|
this.connectivityKnowledge = payload.data;
|
686
|
-
this.connectivityHighlight = [];
|
687
|
-
if (payload.state === "processed") {
|
688
|
-
this.connectivityHighlight = this.connectivityKnowledge.map(conn => conn.id);;
|
689
|
-
this.onShowConnectivity(this.connectivityHighlight);
|
690
|
-
} else {
|
691
|
-
this.hoverChanged();
|
692
|
-
}
|
759
|
+
this.connectivityHighlight = payload.highlight || [];
|
693
760
|
})
|
694
761
|
EventBus.on("modeUpdate", payload => {
|
695
762
|
if (payload === "dataset") {
|
@@ -698,6 +765,10 @@ export default {
|
|
698
765
|
this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
|
699
766
|
}
|
700
767
|
})
|
768
|
+
this.updateGlobalSettingsFromStorage();
|
769
|
+
EventBus.on("connectivity-filter-options", payload => {
|
770
|
+
this.filterOptions = payload;
|
771
|
+
})
|
701
772
|
this.$nextTick(() => {
|
702
773
|
if (this.search === "" && this._facets.length === 0) {
|
703
774
|
if (this.$refs.sideBar) {
|
@@ -18,6 +18,7 @@
|
|
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"
|
@@ -31,6 +32,8 @@
|
|
31
32
|
:enableOpenMapUI="true"
|
32
33
|
:flatmapAPI="flatmapAPI"
|
33
34
|
:sparcAPI="apiLocation"
|
35
|
+
:showLocalSettings="showLocalSettings"
|
36
|
+
:showOpenMapButton="showOpenMapButton"
|
34
37
|
@open-map="openMap"
|
35
38
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
36
39
|
@mapmanager-loaded="onMapmanagerLoaded"
|
@@ -107,7 +110,8 @@ export default {
|
|
107
110
|
EventBus.emit("mapImpProv", provClone); // send clone to context card
|
108
111
|
this.$emit("flatmap-provenance-ready", provClone);
|
109
112
|
this.flatmapReadyForMarkerUpdates(flatmap);
|
110
|
-
this.
|
113
|
+
this.updateSettings();
|
114
|
+
this.loadConnectivityExplorerConfig(flatmap);
|
111
115
|
EventBus.emit("mapLoaded", flatmap);
|
112
116
|
},
|
113
117
|
onPathwaySelectionChanged: function (data) {
|
@@ -168,6 +172,23 @@ export default {
|
|
168
172
|
changeViewingMode: function (modeName) {
|
169
173
|
this.$refs.flatmap.changeViewingMode(modeName);
|
170
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
|
+
},
|
171
192
|
},
|
172
193
|
computed: {
|
173
194
|
facetSpecies() {
|
@@ -187,6 +208,21 @@ export default {
|
|
187
208
|
EventBus.on("hoverUpdate", () => {
|
188
209
|
this.cardHoverHighlight();
|
189
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
|
+
});
|
190
226
|
EventBus.on('show-connectivity', (payload) => {
|
191
227
|
const { featureIds, offset } = payload;
|
192
228
|
const currentFlatmap = this.$refs.flatmap;
|
@@ -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.
|
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,6 +529,36 @@ export default {
|
|
505
529
|
this.cardHoverHighlight();
|
506
530
|
}
|
507
531
|
});
|
532
|
+
EventBus.on('viewingModeUpdate', (payload) => {
|
533
|
+
if (this.flatmapReady) {
|
534
|
+
const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
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);
|
560
|
+
}
|
561
|
+
});
|
508
562
|
},
|
509
563
|
};
|
510
564
|
</script>
|