@abi-software/mapintegratedvuer 1.9.2 → 1.9.3-beta.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-DO6jlHIh.js → ContentMixin-DXXhWj3L.js} +172 -161
- package/dist/{Flatmap-CY9MPW7I.js → Flatmap-DTJJHOZJ.js} +67 -40
- package/dist/{Iframe-XTSWvVQw.js → Iframe-BvIYJdxM.js} +2 -2
- package/dist/{MultiFlatmap-B7e2d6WK.js → MultiFlatmap-DYUAs7aa.js} +87 -59
- package/dist/{Plot-D3lEgm6I.js → Plot-B3waT3eW.js} +2 -2
- package/dist/Scaffold-D1SvYdhM.js +194 -0
- package/dist/{Simulation-CrPJ4_pw.js → Simulation-DEcCnsZ0.js} +2 -2
- package/dist/{index-BcpVBq1h.js → index-_BTFPzpV.js} +19889 -19974
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +226 -6059
- package/dist/style-DqJAtv3f.js +66 -0
- package/dist/style.css +1 -1
- package/package.json +7 -6
- package/src/App.vue +2 -0
- package/src/assets/header-icon.scss +2 -2
- package/src/components/ContentBar.vue +3 -0
- package/src/components/DialogToolbarContent.vue +434 -18
- package/src/components/MapContent.vue +24 -2
- package/src/components/SplitDialog.vue +71 -31
- package/src/components/SplitFlow.vue +140 -60
- package/src/components/viewers/Flatmap.vue +58 -16
- package/src/components/viewers/MultiFlatmap.vue +62 -8
- package/src/components/viewers/Scaffold.vue +24 -1
- package/src/components.d.ts +9 -0
- package/src/mixins/ContentMixin.js +58 -32
- package/src/stores/connectivities.js +59 -11
- package/src/stores/settings.js +15 -4
- package/src/stores/splitFlow.js +6 -6
- 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,87 @@ 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
|
+
if (value.length) {
|
307
|
+
let valueToIds = [];
|
308
|
+
// within AND
|
309
|
+
value.forEach((v) => valueToIds.push(...uniqueFilterSources[key][v]));
|
310
|
+
ids.push(valueToIds);
|
311
|
+
}
|
312
|
+
}
|
313
|
+
// between AND
|
314
|
+
this.filter = ids.length ?
|
315
|
+
[...new Set(ids.reduce((acc, curr) => acc.filter(id => curr.includes(id))))] :
|
316
|
+
[];
|
284
317
|
if (data.type === "query-update") {
|
285
|
-
if (this.query !== data.value) this.target = [];
|
286
318
|
this.query = data.value;
|
287
319
|
} else if (data.type === "filter-update") {
|
288
320
|
this.filter = data.value;
|
289
321
|
}
|
290
322
|
}
|
291
|
-
|
292
323
|
if (this.query) {
|
293
|
-
|
294
|
-
let prom1 = [], options = {};
|
324
|
+
let options = {};
|
295
325
|
const searchTerms = this.query.split(",").map((term) => term.trim());
|
326
|
+
const nestedIds = [];
|
296
327
|
for (let index = 0; index < searchTerms.length; index++) {
|
297
|
-
|
328
|
+
nestedIds.push(this.getSearchedId(currentFlatmap, searchTerms[index]));
|
298
329
|
}
|
299
|
-
const nestedIds = await Promise.all(prom1);
|
300
330
|
const ids = [...new Set(nestedIds.flat())];
|
301
|
-
|
302
|
-
paths =
|
303
|
-
|
304
|
-
|
331
|
+
searchOrders.push(...ids);
|
332
|
+
const paths = await currentFlatmap.retrieveConnectedPaths(ids, options);
|
333
|
+
searchHighlights.push(...paths);
|
334
|
+
results = results.filter((item) => paths.includes(item.id));
|
305
335
|
}
|
306
|
-
|
307
|
-
|
308
|
-
|
336
|
+
if (this.filter.length) {
|
337
|
+
searchHighlights.push(...this.filter);
|
338
|
+
results = results.filter((item) => this.filter.includes(item.id));
|
339
|
+
}
|
340
|
+
searchResults.push(...results);
|
309
341
|
}
|
310
342
|
}
|
311
343
|
}
|
312
344
|
|
313
|
-
const
|
345
|
+
const uniqueOrders = [...new Set(searchOrders)];
|
346
|
+
const uniqueHighlights = [...new Set(searchHighlights)];
|
347
|
+
let uniqueResults = Array.from(
|
314
348
|
new Map(searchResults.map((item) => [item.id, item])).values()
|
315
349
|
);
|
350
|
+
// Ensure that the results always show search items first
|
351
|
+
// and the rest ordered by alphabetical order
|
352
|
+
uniqueResults = [
|
353
|
+
...uniqueResults.filter((r) => uniqueOrders.includes(r.id)),
|
354
|
+
...uniqueResults.filter((r) => !uniqueOrders.includes(r.id))
|
355
|
+
];
|
316
356
|
|
317
357
|
const connectivitiesPayload = {
|
318
|
-
|
358
|
+
highlight: uniqueHighlights,
|
319
359
|
data: uniqueResults,
|
320
360
|
};
|
321
361
|
|
@@ -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,8 @@ export default {
|
|
131
134
|
connectivityHighlight: [],
|
132
135
|
connectivityKnowledge: [],
|
133
136
|
connectivityExplorerClicked: [], // to support multi views
|
137
|
+
filterOptions: [],
|
138
|
+
annotationHighlight: [],
|
134
139
|
}
|
135
140
|
},
|
136
141
|
watch: {
|
@@ -139,16 +144,30 @@ export default {
|
|
139
144
|
if (value) {
|
140
145
|
if (!this._externalStateSet) this.setState(value);
|
141
146
|
this._externalStateSet = true;
|
147
|
+
this.updateGlobalSettingsFromState(value);
|
142
148
|
}
|
143
149
|
},
|
144
150
|
immediate: true,
|
145
151
|
},
|
152
|
+
connectivityHighlight: {
|
153
|
+
handler: function () {
|
154
|
+
this.hoverChanged({ tabType: 'connectivity' });
|
155
|
+
},
|
156
|
+
},
|
157
|
+
annotationHighlight: {
|
158
|
+
handler: function () {
|
159
|
+
this.hoverChanged({ tabType: 'annotation' });
|
160
|
+
},
|
161
|
+
},
|
146
162
|
},
|
147
163
|
methods: {
|
148
|
-
|
149
|
-
this.
|
164
|
+
onConnectivityCollapseChange: function (payload) {
|
165
|
+
this.expanded = payload.id
|
150
166
|
this.onDisplaySearch({ term: payload.id }, false, true);
|
151
167
|
},
|
168
|
+
onConnectivityItemClose: function () {
|
169
|
+
EventBus.emit('connectivity-item-close');
|
170
|
+
},
|
152
171
|
/**
|
153
172
|
* Callback when an action is performed (open new dialogs).
|
154
173
|
*/
|
@@ -302,13 +321,15 @@ export default {
|
|
302
321
|
* @arg featureIds
|
303
322
|
*/
|
304
323
|
onShowConnectivity: function (featureIds) {
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
324
|
+
if (featureIds.length) {
|
325
|
+
const splitFlowState = this.splitFlowStore.getState();
|
326
|
+
const activeView = splitFlowState?.activeView || '';
|
327
|
+
// offset sidebar only on singlepanel and 2horpanel views
|
328
|
+
EventBus.emit('show-connectivity', {
|
329
|
+
featureIds: featureIds,
|
330
|
+
offset: activeView === 'singlepanel' || activeView === '2horpanel'
|
331
|
+
});
|
332
|
+
}
|
312
333
|
},
|
313
334
|
onShowReferenceConnectivities: function (refSource) {
|
314
335
|
EventBus.emit('show-reference-connectivities', refSource);
|
@@ -322,22 +343,20 @@ export default {
|
|
322
343
|
},
|
323
344
|
hoverChanged: function (data) {
|
324
345
|
let hoverAnatomies = [], hoverOrgans = [], hoverDOI = '', hoverConnectivity = [];
|
325
|
-
if (data) {
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
} else {
|
334
|
-
hoverConnectivity = this.connectivityHighlight;
|
346
|
+
if (data.tabType === 'dataset') {
|
347
|
+
hoverAnatomies = data.anatomy ? data.anatomy : [];
|
348
|
+
hoverOrgans = data.organs ? data.organs : [];
|
349
|
+
hoverDOI = data.doi ? data.doi : '';
|
350
|
+
} else if (data.tabType === 'connectivity') {
|
351
|
+
hoverConnectivity = data.id ? [data.id] : this.connectivityHighlight;
|
352
|
+
} else if (data.tabType === 'annotation') {
|
353
|
+
hoverConnectivity = data.models ? [data.models] : this.annotationHighlight;
|
335
354
|
}
|
336
355
|
this.settingsStore.updateHoverFeatures(hoverAnatomies, hoverOrgans, hoverDOI, hoverConnectivity);
|
337
356
|
EventBus.emit("hoverUpdate");
|
338
357
|
},
|
339
358
|
searchChanged: function (data) {
|
340
|
-
if (data.
|
359
|
+
if (data.tabType === 'dataset') {
|
341
360
|
if (data && data.type == "query-update") {
|
342
361
|
this.search = data.value;
|
343
362
|
if (this.search && !this.filterTriggered) {
|
@@ -374,8 +393,8 @@ export default {
|
|
374
393
|
}
|
375
394
|
this.filterTriggered = false; // reset for next action
|
376
395
|
}
|
377
|
-
} else if (data.
|
378
|
-
this.
|
396
|
+
} else if (data.tabType === 'connectivity') {
|
397
|
+
this.expanded = '';
|
379
398
|
this.connectivityEntry = [];
|
380
399
|
EventBus.emit("connectivity-query-filter", data);
|
381
400
|
}
|
@@ -517,7 +536,6 @@ export default {
|
|
517
536
|
// Use to update the connectivity when switch species
|
518
537
|
// Wait for provenance info with uuid update
|
519
538
|
this.$nextTick(() => {
|
520
|
-
// EventBus.emit("connectivity-query-filter");
|
521
539
|
EventBus.emit('species-layout-connectivity-update');
|
522
540
|
this.$refs.sideBar.close();
|
523
541
|
})
|
@@ -585,17 +603,52 @@ export default {
|
|
585
603
|
},
|
586
604
|
onSidebarTabClicked: function (tab) {
|
587
605
|
let globalSettings = { ...this.settingsStore.globalSettings };
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
606
|
+
|
607
|
+
if ('interactiveMode' in globalSettings) {
|
608
|
+
if (tab.id === 1 && tab.type === 'datasetExplorer') {
|
609
|
+
globalSettings.interactiveMode = 'dataset';
|
610
|
+
} else if (tab.id === 2 && tab.type === 'connectivityExplorer') {
|
611
|
+
globalSettings.interactiveMode = 'connectivity';
|
612
|
+
}
|
613
|
+
this.settingsStore.updateGlobalSettings(globalSettings);
|
592
614
|
}
|
593
|
-
|
615
|
+
|
594
616
|
this.$refs.dialogToolbar.loadGlobalSettings();
|
595
617
|
},
|
596
618
|
onSidebarTabClosed: function (tab) {
|
597
619
|
if (tab.id === 3 && tab.type === "annotation") EventBus.emit('annotation-close');
|
598
620
|
},
|
621
|
+
updateGlobalSettingsFromStorage: function () {
|
622
|
+
const globalSettingsFromStorage = localStorage.getItem('mapviewer.globalSettings');
|
623
|
+
if (globalSettingsFromStorage) {
|
624
|
+
this.settingsStore.updateGlobalSettings(JSON.parse(globalSettingsFromStorage));
|
625
|
+
}
|
626
|
+
},
|
627
|
+
updateGlobalSettingsFromState: function (state) {
|
628
|
+
let mappedSettings = null;
|
629
|
+
state.entries.forEach((entry) => {
|
630
|
+
if (entry.state?.state) {
|
631
|
+
const {
|
632
|
+
background,
|
633
|
+
colour,
|
634
|
+
flightPath3D,
|
635
|
+
outlines,
|
636
|
+
viewingMode
|
637
|
+
} = entry.state.state;
|
638
|
+
|
639
|
+
mappedSettings = {
|
640
|
+
viewingMode: viewingMode,
|
641
|
+
flightPathDisplay: flightPath3D,
|
642
|
+
organsDisplay: colour,
|
643
|
+
outlinesDisplay: outlines,
|
644
|
+
backgroundDisplay: background,
|
645
|
+
};
|
646
|
+
}
|
647
|
+
})
|
648
|
+
if (mappedSettings) {
|
649
|
+
this.settingsStore.updateGlobalSettings(mappedSettings);
|
650
|
+
}
|
651
|
+
},
|
599
652
|
},
|
600
653
|
created: function () {
|
601
654
|
this._facets = [];
|
@@ -613,55 +666,84 @@ export default {
|
|
613
666
|
});
|
614
667
|
EventBus.on('annotation-open', payload => {
|
615
668
|
this.annotationEntry = payload.annotationEntry;
|
669
|
+
this.annotationHighlight = this.annotationEntry.map(entry => entry.models);
|
616
670
|
this.annotationCallback = markRaw(payload.commitCallback);
|
617
671
|
if (!payload.createData) {
|
618
672
|
this.createData = markRaw({});
|
619
673
|
} else {
|
620
674
|
this.createData = markRaw(payload.createData);
|
621
675
|
}
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
676
|
+
if (payload.confirmCreate) {
|
677
|
+
this.confirmCreateCallback = markRaw(payload.confirmCreate);
|
678
|
+
}
|
679
|
+
if (payload.cancelCreate) {
|
680
|
+
this.cancelCreateCallback = markRaw(payload.cancelCreate);
|
681
|
+
}
|
682
|
+
if (payload.confirmDelete) {
|
683
|
+
this.confirmDeleteCallback = markRaw(payload.confirmDelete);
|
684
|
+
}
|
685
|
+
if (payload.confirmComment) {
|
686
|
+
this.confirmCommentCallback = markRaw(payload.confirmComment);
|
687
|
+
}
|
626
688
|
if (this.$refs.sideBar) {
|
627
689
|
this.$refs.sideBar.tabClicked({id: 3, type: 'annotation'});
|
628
690
|
this.$refs.sideBar.setDrawerOpen(true);
|
629
691
|
}
|
630
692
|
});
|
631
693
|
EventBus.on('annotation-close', () => {
|
632
|
-
this
|
694
|
+
const globalSettings = { ...this.settingsStore.globalSettings };
|
695
|
+
const { interactiveMode, viewingMode } = globalSettings;
|
696
|
+
|
633
697
|
this.annotationEntry = [];
|
634
698
|
this.createData = {};
|
699
|
+
|
635
700
|
if (this.$refs.sideBar) {
|
636
|
-
|
701
|
+
if (interactiveMode === "dataset") {
|
702
|
+
this.$refs.sideBar.tabClicked({id: 1, type: 'datasetExplorer'});
|
703
|
+
} else if (interactiveMode === "connectivity") {
|
704
|
+
this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
|
705
|
+
}
|
706
|
+
|
707
|
+
if (viewingMode === 'Annotation') {
|
708
|
+
this.$refs.sideBar.setDrawerOpen(false);
|
709
|
+
}
|
710
|
+
|
711
|
+
this.$refs.sideBar.closeConnectivity();
|
712
|
+
EventBus.emit('connectivity-item-close');
|
637
713
|
}
|
638
714
|
});
|
715
|
+
EventBus.on('update-offline-annotation-enabled', (payload) => {
|
716
|
+
this.settingsStore.updateOfflineAnnotationEnabled(payload);
|
717
|
+
});
|
639
718
|
EventBus.on('connectivity-info-open', payload => {
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
719
|
+
// expand connectivity card and show connectivity info
|
720
|
+
// if expanded exist, payload should be an array of one element
|
721
|
+
// skip payload not match the expanded in multiple views
|
722
|
+
const isMatched = payload.some(entry => entry.featureId[0] === this.expanded);
|
723
|
+
if (this.expanded && this.connectivityExplorerClicked.length && !isMatched) {
|
724
|
+
this.connectivityExplorerClicked.pop();
|
725
|
+
return;
|
726
|
+
}
|
727
|
+
this.connectivityEntry = payload.map(entry => {
|
728
|
+
return { ...entry, label: entry.title, id: entry.featureId[0] };
|
729
|
+
});
|
730
|
+
if (this.connectivityExplorerClicked.length) {
|
731
|
+
// only remove clicked if not placeholder entry
|
732
|
+
if (this.connectivityEntry.every(entry => entry.ready)) {
|
733
|
+
this.connectivityExplorerClicked.pop();
|
647
734
|
}
|
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);
|
735
|
+
} else {
|
736
|
+
// click on the flatmap paths/features directly
|
737
|
+
// or onDisplaySearch is performed
|
738
|
+
this.connectivityKnowledge = this.connectivityEntry;
|
739
|
+
if (this.connectivityKnowledge.every(ck => ck.ready)) {
|
740
|
+
this.connectivityHighlight = this.connectivityKnowledge.map(ck => ck.id);
|
658
741
|
}
|
659
742
|
if (this.$refs.sideBar) {
|
660
743
|
this.$refs.sideBar.tabClicked({ id: 2, type: 'connectivityExplorer' });
|
661
744
|
this.$refs.sideBar.setDrawerOpen(true);
|
662
745
|
}
|
663
746
|
}
|
664
|
-
this.connectivityExplorerClicked.pop();
|
665
747
|
});
|
666
748
|
EventBus.on('connectivity-info-close', payload => {
|
667
749
|
if (this.$refs.sideBar) {
|
@@ -683,13 +765,7 @@ export default {
|
|
683
765
|
});
|
684
766
|
EventBus.on("connectivity-knowledge", payload => {
|
685
767
|
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
|
-
}
|
768
|
+
this.connectivityHighlight = payload.highlight || [];
|
693
769
|
})
|
694
770
|
EventBus.on("modeUpdate", payload => {
|
695
771
|
if (payload === "dataset") {
|
@@ -698,6 +774,10 @@ export default {
|
|
698
774
|
this.$refs.sideBar.tabClicked({id: 2, type: 'connectivityExplorer'});
|
699
775
|
}
|
700
776
|
})
|
777
|
+
this.updateGlobalSettingsFromStorage();
|
778
|
+
EventBus.on("connectivity-filter-options", payload => {
|
779
|
+
this.filterOptions = payload;
|
780
|
+
})
|
701
781
|
this.$nextTick(() => {
|
702
782
|
if (this.search === "" && this._facets.length === 0) {
|
703
783
|
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() {
|
@@ -176,31 +197,52 @@ export default {
|
|
176
197
|
},
|
177
198
|
mounted: function() {
|
178
199
|
EventBus.on('annotation-close', () => {
|
179
|
-
|
180
|
-
|
181
|
-
|
200
|
+
if (this?.alive) {
|
201
|
+
const currentFlatmap = this.$refs.flatmap;
|
202
|
+
if (currentFlatmap) {
|
203
|
+
this.$refs.flatmap.annotationEventCallback({}, { type: 'aborted' })
|
204
|
+
}
|
182
205
|
}
|
183
206
|
});
|
184
207
|
EventBus.on("markerUpdate", () => {
|
185
|
-
this.flatmapMarkerUpdate(undefined);
|
208
|
+
if (this?.alive) this.flatmapMarkerUpdate(undefined);
|
186
209
|
});
|
187
210
|
EventBus.on("hoverUpdate", () => {
|
188
|
-
this.cardHoverHighlight();
|
211
|
+
if (this?.alive) this.cardHoverHighlight();
|
212
|
+
});
|
213
|
+
EventBus.on('viewingModeUpdate', (payload) => {
|
214
|
+
if (this?.alive) this.$refs.flatmap.changeViewingMode(payload);
|
215
|
+
});
|
216
|
+
EventBus.on('flightPathUpdate', (payload) => {
|
217
|
+
if (this?.alive) this.$refs.flatmap.setFlightPath3D(payload);
|
218
|
+
});
|
219
|
+
EventBus.on('organsDisplayUpdate', (payload) => {
|
220
|
+
if (this?.alive) this.$refs.flatmap.setColour(payload);
|
221
|
+
});
|
222
|
+
EventBus.on('outlinesDisplayUpdate', (payload) => {
|
223
|
+
if (this?.alive) this.$refs.flatmap.setOutlines(payload);
|
224
|
+
});
|
225
|
+
EventBus.on('backgroundDisplayUpdate', (payload) => {
|
226
|
+
if (this?.alive) this.$refs.flatmap.backgroundChangeCallback(payload);
|
189
227
|
});
|
190
228
|
EventBus.on('show-connectivity', (payload) => {
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
currentFlatmap
|
195
|
-
|
196
|
-
|
197
|
-
|
229
|
+
if (this?.alive) {
|
230
|
+
const { featureIds, offset } = payload;
|
231
|
+
const currentFlatmap = this.$refs.flatmap;
|
232
|
+
if (currentFlatmap) {
|
233
|
+
currentFlatmap.moveMap(featureIds, {
|
234
|
+
offsetX: offset ? -150 : 0,
|
235
|
+
zoom: 4,
|
236
|
+
});
|
237
|
+
}
|
198
238
|
}
|
199
239
|
});
|
200
240
|
EventBus.on('show-reference-connectivities', (payload) => {
|
201
|
-
|
202
|
-
|
203
|
-
currentFlatmap
|
241
|
+
if (this?.alive) {
|
242
|
+
const currentFlatmap = this.$refs.flatmap;
|
243
|
+
if (currentFlatmap) {
|
244
|
+
currentFlatmap.showConnectivitiesByReference(payload);
|
245
|
+
}
|
204
246
|
}
|
205
247
|
});
|
206
248
|
},
|