@abi-software/mapintegratedvuer 1.21.1 → 1.21.2
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/README.md +23 -5
- package/assets/location-icon.html +33 -1
- package/assets/styleguide.css +18 -18
- package/cypress.config.js +7 -9
- package/dist/{ConnectivityGraph-CZMROk9r.js → ConnectivityGraph-DrSaFEDd.js} +3 -3
- package/dist/{ContentMixin-Vn34n5t2.js → ContentMixin-Xg0PjBqG.js} +2 -2
- package/dist/{DynamicMarkerMixin-BS6t7w_i.js → DynamicMarkerMixin-D5Ruu_hd.js} +1 -1
- package/dist/{Flatmap-BejxA0uz.js → Flatmap-CxN8TbnS.js} +4 -4
- package/dist/{Iframe-BWbhTjCR.js → Iframe-CkgbLfJt.js} +4 -4
- package/dist/{MultiFlatmap-nlmsH-Ib.js → MultiFlatmap-CkejvAJe.js} +4 -4
- package/dist/{Plot-ChbPsDZX.js → Plot-BfwoipSl.js} +2 -2
- package/dist/{Scaffold-C6f7c7Ha.js → Scaffold-DCqsTKpg.js} +4 -4
- package/dist/{Simulation-DcJScRYo.js → Simulation-BOtU3kTT.js} +2 -2
- package/dist/{connectivities-UXTqf7_0.js → connectivities-DyeS8w0c.js} +126 -95
- package/dist/index.html +9 -6
- package/dist/mapintegratedvuer.js +5489 -5578
- package/dist/mapintegratedvuer.umd.cjs +196 -196
- package/dist/style.css +1 -1
- package/eslint.config.js +39 -15
- package/package.json +11 -5
- package/public/index.html +9 -6
- package/src/App.vue +234 -249
- package/src/assets/_variables.scss +12 -10
- package/src/assets/header-icon.scss +8 -9
- package/src/assets/mapicon-species-style.css +10 -8
- package/src/assets/styles.scss +1 -1
- package/src/components/ContentBar.vue +98 -106
- package/src/components/ContentVuer.vue +36 -39
- package/src/components/ContextCard.vue +238 -199
- package/src/components/ContextHelp.vue +22 -26
- package/src/components/CustomSplitter.vue +32 -43
- package/src/components/DatasetHeader.vue +37 -41
- package/src/components/DialogToolbarContent.vue +292 -256
- package/src/components/FlatmapContextCard.vue +52 -57
- package/src/components/MapContent.vue +90 -86
- package/src/components/ResizeSensor.vue +8 -13
- package/src/components/SearchControls.vue +26 -35
- package/src/components/SimulatedData.js +196 -219
- package/src/components/SplitDialog.vue +139 -129
- package/src/components/SplitFlow.vue +421 -237
- package/src/components/index.js +1 -3
- package/src/components/scripts/simulation_data.js +393 -397
- package/src/components/scripts/utilities.js +108 -78
- package/src/components/viewers/CellDLViewer.vue +9 -9
- package/src/components/viewers/ConnectivityGraph.vue +9 -12
- package/src/components/viewers/Flatmap.vue +23 -25
- package/src/components/viewers/Iframe.vue +8 -10
- package/src/components/viewers/MultiFlatmap.vue +59 -69
- package/src/components/viewers/Plot.vue +6 -7
- package/src/components/viewers/Scaffold.vue +73 -63
- package/src/components/viewers/Simulation.vue +10 -15
- package/src/main.js +16 -21
- package/src/mixins/ContentMixin.js +208 -178
- package/src/mixins/DynamicMarkerMixin.js +14 -18
- package/src/mixins/RetrieveContextCardMixin.js +35 -30
- package/src/mixins/S3Bucket.vue +10 -13
- package/src/services/knowledgeMapping.js +53 -53
- package/src/services/tagging.js +4 -4
- package/src/stores/connectivities.js +46 -8
- package/src/stores/entries.js +7 -9
- package/src/stores/index.js +7 -7
- package/src/stores/settings.js +23 -31
- package/src/stores/splitFlow.js +364 -298
- package/vite.bundle-build.js +24 -26
- package/vite.config.js +22 -21
- package/vite.static-build.js +4 -4
- package/vitest.workspace.js +1 -3
- package/vuese-generator.js +47 -55
|
@@ -5,92 +5,91 @@ const initialDefaultState = () => {
|
|
|
5
5
|
entries: [
|
|
6
6
|
{
|
|
7
7
|
resource: defaultSpecies,
|
|
8
|
-
type:
|
|
9
|
-
mode:
|
|
8
|
+
type: 'MultiFlatmap',
|
|
9
|
+
mode: 'main',
|
|
10
10
|
id: 1,
|
|
11
11
|
state: undefined,
|
|
12
|
-
label:
|
|
13
|
-
discoverId: undefined
|
|
14
|
-
}
|
|
12
|
+
label: '',
|
|
13
|
+
discoverId: undefined,
|
|
14
|
+
},
|
|
15
15
|
],
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
const getNewMapEntry = async (type, sparcApi) => {
|
|
20
|
-
let entry = {
|
|
21
|
-
if (type ===
|
|
20
|
+
let entry = {};
|
|
21
|
+
if (type === 'AC') {
|
|
22
22
|
entry = {
|
|
23
23
|
resource: defaultSpecies,
|
|
24
|
-
type:
|
|
25
|
-
mode:
|
|
24
|
+
type: 'MultiFlatmap',
|
|
25
|
+
mode: 'main',
|
|
26
26
|
state: undefined,
|
|
27
|
-
label:
|
|
28
|
-
discoverId: undefined
|
|
27
|
+
label: '',
|
|
28
|
+
discoverId: undefined,
|
|
29
29
|
};
|
|
30
|
-
} else if (type ===
|
|
30
|
+
} else if (type === 'FC') {
|
|
31
31
|
entry = {
|
|
32
|
-
resource:
|
|
33
|
-
type:
|
|
34
|
-
mode:
|
|
32
|
+
resource: 'FunctionalConnectivity',
|
|
33
|
+
type: 'Flatmap',
|
|
34
|
+
mode: 'main',
|
|
35
35
|
state: undefined,
|
|
36
|
-
label:
|
|
37
|
-
discoverId: undefined
|
|
38
|
-
}
|
|
39
|
-
} else if (type ===
|
|
40
|
-
const data = await getBodyScaffoldInfo(sparcApi,
|
|
36
|
+
label: 'Functional',
|
|
37
|
+
discoverId: undefined,
|
|
38
|
+
};
|
|
39
|
+
} else if (type === '3D') {
|
|
40
|
+
const data = await getBodyScaffoldInfo(sparcApi, 'human');
|
|
41
41
|
entry = {
|
|
42
42
|
resource: data.url,
|
|
43
|
-
type:
|
|
44
|
-
mode:
|
|
43
|
+
type: 'Scaffold',
|
|
44
|
+
mode: 'main',
|
|
45
45
|
state: undefined,
|
|
46
|
-
label:
|
|
46
|
+
label: 'Human',
|
|
47
47
|
discoverId: data.datasetInfo.discoverId,
|
|
48
48
|
contextCardUrl: data.datasetInfo.contextCardUrl,
|
|
49
49
|
s3uri: data.datasetInfo.s3uri,
|
|
50
50
|
version: data.datasetInfo.version,
|
|
51
51
|
isBodyScaffold: true,
|
|
52
52
|
};
|
|
53
|
-
} else if (type ===
|
|
53
|
+
} else if (type === 'CG') {
|
|
54
54
|
entry = {
|
|
55
|
-
resource:
|
|
56
|
-
type:
|
|
57
|
-
mode:
|
|
55
|
+
resource: 'ConnectivityGraph',
|
|
56
|
+
type: 'ConnectivityGraph',
|
|
57
|
+
mode: 'main',
|
|
58
58
|
state: undefined,
|
|
59
|
-
label:
|
|
60
|
-
discoverId: undefined
|
|
61
|
-
}
|
|
59
|
+
label: 'Connectivity Graph',
|
|
60
|
+
discoverId: undefined,
|
|
61
|
+
};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return entry;
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
66
|
|
|
67
67
|
/*
|
|
68
68
|
* Initial state for the split flow
|
|
69
69
|
*/
|
|
70
70
|
const initialState = async (type, sparcApi) => {
|
|
71
71
|
const state = initialDefaultState();
|
|
72
|
-
if (type ===
|
|
73
|
-
state.entries[0].resource =
|
|
74
|
-
state.entries[0].type =
|
|
75
|
-
state.entries[0].label =
|
|
76
|
-
} else if (type ===
|
|
77
|
-
const data = await getBodyScaffoldInfo(sparcApi,
|
|
72
|
+
if (type === 'FC') {
|
|
73
|
+
state.entries[0].resource = 'FunctionalConnectivity';
|
|
74
|
+
state.entries[0].type = 'Flatmap';
|
|
75
|
+
state.entries[0].label = 'Functional';
|
|
76
|
+
} else if (type === 'WholeBody') {
|
|
77
|
+
const data = await getBodyScaffoldInfo(sparcApi, 'human');
|
|
78
78
|
state.entries[0].resource = data.url;
|
|
79
79
|
state.entries[0].contextCardUrl = data.datasetInfo.contextCardUrl;
|
|
80
|
-
state.entries[0].discoverId = data.datasetInfo.discoverId,
|
|
81
|
-
|
|
80
|
+
((state.entries[0].discoverId = data.datasetInfo.discoverId),
|
|
81
|
+
(state.entries[0].s3uri = data.datasetInfo.s3uri));
|
|
82
82
|
state.entries[0].version = data.datasetInfo.version;
|
|
83
|
-
state.entries[0].type =
|
|
84
|
-
state.entries[0].label =
|
|
83
|
+
state.entries[0].type = 'Scaffold';
|
|
84
|
+
state.entries[0].label = 'Human';
|
|
85
85
|
state.entries[0].isBodyScaffold = true;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
return state;
|
|
89
|
-
}
|
|
89
|
+
};
|
|
90
90
|
|
|
91
|
-
const capitalise = term => {
|
|
92
|
-
if (term)
|
|
93
|
-
return term.charAt(0).toUpperCase() + term.slice(1);
|
|
91
|
+
const capitalise = (term) => {
|
|
92
|
+
if (term) return term.charAt(0).toUpperCase() + term.slice(1);
|
|
94
93
|
return term;
|
|
95
94
|
};
|
|
96
95
|
|
|
@@ -99,54 +98,85 @@ const capitalise = term => {
|
|
|
99
98
|
*/
|
|
100
99
|
const availableSpecies = () => {
|
|
101
100
|
return {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
'Human Female': {
|
|
102
|
+
taxo: 'NCBITaxon:9606',
|
|
103
|
+
biologicalSex: 'PATO:0000383',
|
|
104
|
+
iconClass: 'mapicon-icon_human',
|
|
105
|
+
displayLatestChanges: true,
|
|
106
|
+
displayWarning: false,
|
|
107
|
+
},
|
|
108
|
+
'Human Male': {
|
|
109
|
+
taxo: 'NCBITaxon:9606',
|
|
110
|
+
biologicalSex: 'PATO:0000384',
|
|
111
|
+
iconClass: 'mapicon-icon_human',
|
|
112
|
+
displayLatestChanges: true,
|
|
113
|
+
displayWarning: false,
|
|
114
|
+
},
|
|
115
|
+
Rat: {
|
|
116
|
+
taxo: 'NCBITaxon:10114',
|
|
117
|
+
iconClass: 'mapicon-icon_rat',
|
|
118
|
+
displayLatestChanges: true,
|
|
119
|
+
displayWarning: false,
|
|
120
|
+
},
|
|
121
|
+
Mouse: {
|
|
122
|
+
taxo: 'NCBITaxon:10090',
|
|
123
|
+
iconClass: 'mapicon-icon_mouse',
|
|
124
|
+
displayLatestChanges: true,
|
|
125
|
+
displayWarning: false,
|
|
126
|
+
},
|
|
127
|
+
Pig: {
|
|
128
|
+
taxo: 'NCBITaxon:9823',
|
|
129
|
+
iconClass: 'mapicon-icon_pig',
|
|
130
|
+
displayLatestChanges: true,
|
|
131
|
+
displayWarning: false,
|
|
132
|
+
},
|
|
133
|
+
Cat: {
|
|
134
|
+
taxo: 'NCBITaxon:9685',
|
|
135
|
+
iconClass: 'mapicon-icon_cat',
|
|
136
|
+
displayLatestChanges: true,
|
|
137
|
+
displayWarning: true,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
};
|
|
110
141
|
|
|
111
142
|
/*
|
|
112
143
|
* Look for the key in availableSpecies with the provided condition
|
|
113
144
|
*/
|
|
114
|
-
const findSpeciesKey = condition => {
|
|
145
|
+
const findSpeciesKey = (condition) => {
|
|
115
146
|
if (condition) {
|
|
116
147
|
const list = availableSpecies();
|
|
117
148
|
for (let key in list) {
|
|
118
149
|
if (condition.taxo === list[key].taxo) {
|
|
119
150
|
if (condition.biologicalSex && list[key].biologicalSex) {
|
|
120
|
-
if (condition.biologicalSex === list[key].biologicalSex)
|
|
121
|
-
return key;
|
|
151
|
+
if (condition.biologicalSex === list[key].biologicalSex) return key;
|
|
122
152
|
} else {
|
|
123
153
|
return key;
|
|
124
154
|
}
|
|
125
155
|
}
|
|
126
156
|
}
|
|
127
157
|
}
|
|
128
|
-
return
|
|
129
|
-
}
|
|
158
|
+
return '';
|
|
159
|
+
};
|
|
130
160
|
|
|
131
|
-
const extractS3BucketNameAndPrefix = uri => {
|
|
161
|
+
const extractS3BucketNameAndPrefix = (uri) => {
|
|
132
162
|
if (uri) {
|
|
133
|
-
const substring = uri.split(
|
|
163
|
+
const substring = uri.split('//')[1];
|
|
134
164
|
if (substring) {
|
|
135
|
-
const s3Bucket = substring.split(
|
|
165
|
+
const s3Bucket = substring.split('/')[0];
|
|
136
166
|
const n = substring.indexOf('/');
|
|
137
167
|
const s3Prefix = substring.substring(n + 1);
|
|
138
168
|
return {
|
|
139
169
|
s3Bucket,
|
|
140
|
-
s3Prefix
|
|
170
|
+
s3Prefix,
|
|
141
171
|
};
|
|
142
172
|
}
|
|
143
173
|
}
|
|
144
|
-
return undefined
|
|
145
|
-
}
|
|
174
|
+
return undefined;
|
|
175
|
+
};
|
|
146
176
|
|
|
147
177
|
const getBodyScaffoldInfo = async (sparcApi, species) => {
|
|
148
178
|
//Get body scaffold information
|
|
149
|
-
let url =
|
|
179
|
+
let url = '';
|
|
150
180
|
let datasetInfo = undefined;
|
|
151
181
|
const response = await fetch(`${sparcApi}get_body_scaffold_info/${species}`);
|
|
152
182
|
if (response.ok) {
|
|
@@ -163,23 +193,23 @@ const getBodyScaffoldInfo = async (sparcApi, species) => {
|
|
|
163
193
|
};
|
|
164
194
|
} else {
|
|
165
195
|
//Use default url if data is not found for any reason
|
|
166
|
-
if (species ===
|
|
167
|
-
url =
|
|
168
|
-
|
|
169
|
-
|
|
196
|
+
if (species === 'rat') {
|
|
197
|
+
url =
|
|
198
|
+
'https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json';
|
|
199
|
+
} else if (species === 'human') {
|
|
200
|
+
url =
|
|
201
|
+
'https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json';
|
|
170
202
|
}
|
|
171
203
|
}
|
|
172
204
|
|
|
173
|
-
return {url, datasetInfo};
|
|
174
|
-
}
|
|
205
|
+
return { url, datasetInfo };
|
|
206
|
+
};
|
|
175
207
|
|
|
176
208
|
// Array intersection
|
|
177
209
|
const intersectArrays = (arr1, arr2) => {
|
|
178
|
-
const lowerArr2 = arr2.map(x => typeof x === 'string' ? x.toLowerCase() : x);
|
|
179
|
-
return arr1.filter(x =>
|
|
180
|
-
typeof x === 'string'
|
|
181
|
-
? lowerArr2.includes(x.toLowerCase())
|
|
182
|
-
: lowerArr2.includes(x)
|
|
210
|
+
const lowerArr2 = arr2.map((x) => (typeof x === 'string' ? x.toLowerCase() : x));
|
|
211
|
+
return arr1.filter((x) =>
|
|
212
|
+
typeof x === 'string' ? lowerArr2.includes(x.toLowerCase()) : lowerArr2.includes(x),
|
|
183
213
|
);
|
|
184
214
|
};
|
|
185
215
|
|
|
@@ -217,4 +247,4 @@ export {
|
|
|
217
247
|
intersectArrays,
|
|
218
248
|
transformObjToString,
|
|
219
249
|
transformStringToObj,
|
|
220
|
-
}
|
|
250
|
+
};
|
|
@@ -11,27 +11,27 @@
|
|
|
11
11
|
/* eslint-disable no-alert, no-console */
|
|
12
12
|
import './cellDLViewer.css';
|
|
13
13
|
import CellDLViewer from '@celldl/viewer';
|
|
14
|
-
import ContentMixin from
|
|
14
|
+
import ContentMixin from '../../mixins/ContentMixin';
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
name:
|
|
18
|
-
mixins: [
|
|
17
|
+
name: 'CellDLView',
|
|
18
|
+
mixins: [ContentMixin],
|
|
19
19
|
components: {
|
|
20
20
|
CellDLViewer,
|
|
21
21
|
},
|
|
22
|
-
data: function() {
|
|
22
|
+
data: function () {
|
|
23
23
|
return {
|
|
24
24
|
annotations: {},
|
|
25
25
|
celldlData: '',
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
},
|
|
28
28
|
methods: {
|
|
29
|
-
onError: function() {
|
|
29
|
+
onError: function () {
|
|
30
30
|
console.log(msg);
|
|
31
31
|
},
|
|
32
|
-
onEvent: function() {
|
|
32
|
+
onEvent: function () {
|
|
33
33
|
console.log(detail);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
36
|
};
|
|
37
37
|
</script>
|
|
@@ -22,16 +22,13 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
|
|
26
|
-
import
|
|
27
|
-
ConnectivityGraph as MapUtilitiesConnectivityGraph,
|
|
28
|
-
} from '@abi-software/map-utilities';
|
|
29
|
-
import ContentMixin from "../../mixins/ContentMixin";
|
|
25
|
+
import { ConnectivityGraph as MapUtilitiesConnectivityGraph } from '@abi-software/map-utilities';
|
|
26
|
+
import ContentMixin from '../../mixins/ContentMixin';
|
|
30
27
|
import EventBus from '../EventBus';
|
|
31
28
|
|
|
32
29
|
export default {
|
|
33
|
-
name:
|
|
34
|
-
mixins: [
|
|
30
|
+
name: 'ConnectivityGraph',
|
|
31
|
+
mixins: [ContentMixin],
|
|
35
32
|
components: {
|
|
36
33
|
MapUtilitiesConnectivityGraph,
|
|
37
34
|
},
|
|
@@ -84,7 +81,7 @@ export default {
|
|
|
84
81
|
},
|
|
85
82
|
methods: {
|
|
86
83
|
onTapNode: function (data) {
|
|
87
|
-
const name = data.map(t => t.label).join(', ');
|
|
84
|
+
const name = data.map((t) => t.label).join(', ');
|
|
88
85
|
this.onConnectivityHovered(name);
|
|
89
86
|
},
|
|
90
87
|
onConnectivityHovered: function (label) {
|
|
@@ -100,17 +97,17 @@ export default {
|
|
|
100
97
|
const names = label.split(',');
|
|
101
98
|
let data = [];
|
|
102
99
|
names.forEach((n) => {
|
|
103
|
-
const foundData = allWithDatasets.find(
|
|
104
|
-
a.name.toLowerCase().trim() === n.toLowerCase().trim()
|
|
100
|
+
const foundData = allWithDatasets.find(
|
|
101
|
+
(a) => a.name.toLowerCase().trim() === n.toLowerCase().trim(),
|
|
105
102
|
);
|
|
106
103
|
if (foundData) {
|
|
107
104
|
data.push({
|
|
108
105
|
id: foundData.id,
|
|
109
|
-
label: foundData.name
|
|
106
|
+
label: foundData.name,
|
|
110
107
|
});
|
|
111
108
|
}
|
|
112
109
|
});
|
|
113
|
-
return data
|
|
110
|
+
return data;
|
|
114
111
|
},
|
|
115
112
|
},
|
|
116
113
|
};
|
|
@@ -57,20 +57,19 @@
|
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<script>
|
|
60
|
-
/* eslint-disable no-alert, no-console */
|
|
61
60
|
import Tagging from '../../services/tagging.js';
|
|
62
|
-
import EventBus from
|
|
63
|
-
import ContentMixin from
|
|
64
|
-
import DynamicMarkerMixin from
|
|
61
|
+
import EventBus from '../EventBus';
|
|
62
|
+
import ContentMixin from '../../mixins/ContentMixin';
|
|
63
|
+
import DynamicMarkerMixin from '../../mixins/DynamicMarkerMixin';
|
|
65
64
|
|
|
66
|
-
import { FlatmapVuer } from
|
|
67
|
-
import
|
|
68
|
-
import { HelpModeDialog } from '@abi-software/map-utilities'
|
|
69
|
-
import '@abi-software/map-utilities/dist/style.css'
|
|
65
|
+
import { FlatmapVuer } from '@abi-software/flatmapvuer';
|
|
66
|
+
import '@abi-software/flatmapvuer/dist/style.css';
|
|
67
|
+
import { HelpModeDialog } from '@abi-software/map-utilities';
|
|
68
|
+
import '@abi-software/map-utilities/dist/style.css';
|
|
70
69
|
|
|
71
70
|
export default {
|
|
72
|
-
name:
|
|
73
|
-
mixins: [
|
|
71
|
+
name: 'Flatmap',
|
|
72
|
+
mixins: [ContentMixin, DynamicMarkerMixin],
|
|
74
73
|
components: {
|
|
75
74
|
FlatmapVuer,
|
|
76
75
|
HelpModeDialog,
|
|
@@ -79,7 +78,7 @@ export default {
|
|
|
79
78
|
return {
|
|
80
79
|
flatmapReady: false,
|
|
81
80
|
displayMinimap: false,
|
|
82
|
-
}
|
|
81
|
+
};
|
|
83
82
|
},
|
|
84
83
|
methods: {
|
|
85
84
|
getState: function () {
|
|
@@ -106,14 +105,14 @@ export default {
|
|
|
106
105
|
this.updateEntryLabel(mapImp?.mapMetadata?.name);
|
|
107
106
|
this.updateEntryTitle(mapImp?.mapMetadata?.name);
|
|
108
107
|
}
|
|
109
|
-
let provClone = {id: this.entry.id, prov: mapImp.mapMetadata}; //create clone of provenance and add id
|
|
110
|
-
EventBus.emit(
|
|
111
|
-
this.$emit(
|
|
108
|
+
let provClone = { id: this.entry.id, prov: mapImp.mapMetadata }; //create clone of provenance and add id
|
|
109
|
+
EventBus.emit('mapImpProv', provClone); // send clone to context card
|
|
110
|
+
this.$emit('flatmap-provenance-ready', provClone);
|
|
112
111
|
this.flatmapReadyForMarkerUpdates(flatmap);
|
|
113
112
|
this.updateViewerSettings();
|
|
114
113
|
// Wait for flatmap's connectivity to load before emitting mapLoaded
|
|
115
114
|
this.loadConnectivityExplorerConfig(flatmap).then(() => {
|
|
116
|
-
EventBus.emit(
|
|
115
|
+
EventBus.emit('mapLoaded', flatmap);
|
|
117
116
|
});
|
|
118
117
|
},
|
|
119
118
|
onPathwaySelectionChanged: function (data) {
|
|
@@ -121,17 +120,17 @@ export default {
|
|
|
121
120
|
// GA Tagging
|
|
122
121
|
// Event tracking for maps' pathway selection change
|
|
123
122
|
Tagging.sendEvent({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
event: 'interaction_event',
|
|
124
|
+
event_name: 'portal_maps_pathway_change',
|
|
125
|
+
category: label + ' [' + property + '] ' + checked,
|
|
126
|
+
location: selectionsTitle,
|
|
128
127
|
});
|
|
129
128
|
},
|
|
130
|
-
onSidebarAnnotationClose: function() {
|
|
129
|
+
onSidebarAnnotationClose: function () {
|
|
131
130
|
if (this.flatmapReady) {
|
|
132
131
|
const currentFlatmap = this.$refs.flatmap;
|
|
133
132
|
if (currentFlatmap) {
|
|
134
|
-
this.$refs.flatmap.annotationEventCallback({}, { type: 'aborted' })
|
|
133
|
+
this.$refs.flatmap.annotationEventCallback({}, { type: 'aborted' });
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
},
|
|
@@ -142,10 +141,9 @@ export default {
|
|
|
142
141
|
if (term && this.$refs.flatmap.mapImp) {
|
|
143
142
|
const results = this.$refs.flatmap.mapImp.search(term);
|
|
144
143
|
const featureIds = results.__featureIds || results.featureIds;
|
|
145
|
-
featureIds.forEach(id => {
|
|
144
|
+
featureIds.forEach((id) => {
|
|
146
145
|
const annotation = this.$refs.flatmap.mapImp.annotation(id);
|
|
147
|
-
if (annotation && annotation.label)
|
|
148
|
-
suggestions.push(annotation.label);
|
|
146
|
+
if (annotation && annotation.label) suggestions.push(annotation.label);
|
|
149
147
|
});
|
|
150
148
|
}
|
|
151
149
|
},
|
|
@@ -185,7 +183,7 @@ export default {
|
|
|
185
183
|
}
|
|
186
184
|
}
|
|
187
185
|
},
|
|
188
|
-
zoomToFeatures: function(info, forceSelect) {
|
|
186
|
+
zoomToFeatures: function (info, forceSelect) {
|
|
189
187
|
let name = info.name;
|
|
190
188
|
const flatmap = this.$refs.flatmap.mapImp;
|
|
191
189
|
if (name) {
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="map-iframe-container">
|
|
3
|
-
|
|
3
|
+
<iframe class="my-iframe" :src="entry.resource.share_link" ref="iframe"></iframe>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
|
|
9
|
-
import ContentMixin from "../../mixins/ContentMixin";
|
|
8
|
+
import ContentMixin from '../../mixins/ContentMixin';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
|
-
name:
|
|
13
|
-
mixins: [
|
|
11
|
+
name: 'MapIframe',
|
|
12
|
+
mixins: [ContentMixin],
|
|
14
13
|
};
|
|
15
14
|
</script>
|
|
16
15
|
|
|
17
16
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
18
17
|
<style scoped lang="scss">
|
|
19
|
-
|
|
20
18
|
.map-iframe-container {
|
|
21
19
|
height: 100%;
|
|
22
20
|
width: 100%;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
.my-iframe {
|
|
26
|
-
height:100%;
|
|
27
|
-
width:100%;
|
|
28
|
-
position:relative;
|
|
29
|
-
border-width:0px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
width: 100%;
|
|
26
|
+
position: relative;
|
|
27
|
+
border-width: 0px;
|
|
30
28
|
}
|
|
31
29
|
</style>
|