@abi-software/map-side-bar 2.10.2 → 2.10.3
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/map-side-bar.js +488 -450
- package/dist/map-side-bar.umd.cjs +22 -22
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/BadgesGroup.vue +2 -1
- package/src/components/DatasetExplorer.vue +2 -0
- package/src/components/ImageGallery.vue +46 -0
- package/src/components/index.js +0 -3
package/package.json
CHANGED
|
@@ -85,9 +85,10 @@ export default {
|
|
|
85
85
|
deep: true,
|
|
86
86
|
immediate: true,
|
|
87
87
|
handler: function () {
|
|
88
|
+
this.addToCategories(this.entry.flatmaps, 'Flatmaps')
|
|
89
|
+
this.addToCategories(this.entry.plots, 'Plots')
|
|
88
90
|
this.addToCategories(this.entry.scaffolds, 'Scaffolds')
|
|
89
91
|
this.addToCategories(this.entry.segmentation, 'Segmentations')
|
|
90
|
-
this.addToCategories(this.entry.plots, 'Plots')
|
|
91
92
|
this.addSimulationsToCategories(this.entry.simulation)
|
|
92
93
|
/** disable the following
|
|
93
94
|
this.addToCategories(this.entry.images, 'Images');
|
|
@@ -462,7 +462,9 @@ export default {
|
|
|
462
462
|
? element['abi-contextual-information']
|
|
463
463
|
: undefined,
|
|
464
464
|
segmentation: element['mbf-segmentation'],
|
|
465
|
+
//omex format will be the preferred mimetype
|
|
465
466
|
simulation: element['abi-simulation-omex-file'] ? element['abi-simulation-omex-file'] : element['abi-simulation-file'],
|
|
467
|
+
flatmaps: element['abi-flatmap-file'],
|
|
466
468
|
additionalLinks: element.additionalLinks,
|
|
467
469
|
detailsReady: true,
|
|
468
470
|
})
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
92
92
|
//Use the Images instead for Biolucida Images
|
|
93
93
|
//"Biolucida Images": [],
|
|
94
94
|
Dataset: [],
|
|
95
|
+
Flatmaps:[],
|
|
95
96
|
Images: [],
|
|
96
97
|
Scaffolds: [],
|
|
97
98
|
Segmentations: [],
|
|
@@ -123,6 +124,7 @@ export default {
|
|
|
123
124
|
createSciCurnchItems: function () {
|
|
124
125
|
this.updateS3Bucket(this.entry.s3uri)
|
|
125
126
|
this.createDatasetItem()
|
|
127
|
+
this.createFlatmapItems()
|
|
126
128
|
this.createScaffoldItems()
|
|
127
129
|
this.createSimulationItems()
|
|
128
130
|
this.createPlotItems()
|
|
@@ -147,6 +149,48 @@ export default {
|
|
|
147
149
|
})
|
|
148
150
|
}
|
|
149
151
|
},
|
|
152
|
+
createFlatmapItems: function () {
|
|
153
|
+
if (this.entry.flatmaps) {
|
|
154
|
+
this.entry.flatmaps.forEach((flatmap) => {
|
|
155
|
+
if (flatmap.associated_flatmap?.identifier) {
|
|
156
|
+
const filePath = flatmap.dataset.path
|
|
157
|
+
const id = flatmap.identifier
|
|
158
|
+
const thumbnail = this.getThumbnailForPlot(
|
|
159
|
+
flatmap,
|
|
160
|
+
this.entry.thumbnails
|
|
161
|
+
)
|
|
162
|
+
let thumbnailURL = undefined
|
|
163
|
+
let mimetype = ''
|
|
164
|
+
if (thumbnail) {
|
|
165
|
+
thumbnailURL = this.getImageURL(this.envVars.API_LOCATION, {
|
|
166
|
+
id,
|
|
167
|
+
prefix: this.getS3Prefix(),
|
|
168
|
+
file_path: thumbnail.dataset.path,
|
|
169
|
+
s3Bucket: this.s3Bucket,
|
|
170
|
+
})
|
|
171
|
+
mimetype = thumbnail.mimetype.name
|
|
172
|
+
}
|
|
173
|
+
let action = {
|
|
174
|
+
label: capitalise(this.label),
|
|
175
|
+
resource: flatmap.associated_flatmap.identifier,
|
|
176
|
+
title: 'View Flatmap',
|
|
177
|
+
type: 'Flatmap',
|
|
178
|
+
discoverId: this.datasetId,
|
|
179
|
+
version: this.datasetVersion,
|
|
180
|
+
}
|
|
181
|
+
this.items['Flatmaps'].push({
|
|
182
|
+
id,
|
|
183
|
+
title: baseName(filePath),
|
|
184
|
+
type: 'Flatmap',
|
|
185
|
+
thumbnail: thumbnailURL,
|
|
186
|
+
userData: action,
|
|
187
|
+
hideType: true,
|
|
188
|
+
mimetype,
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
},
|
|
150
194
|
createImageItems: function () {
|
|
151
195
|
if (this.entry.images) {
|
|
152
196
|
this.entry.images.forEach((image) => {
|
|
@@ -348,6 +392,8 @@ export default {
|
|
|
348
392
|
} else {
|
|
349
393
|
const filePath = simulation.dataset.path
|
|
350
394
|
const id = simulation.identifier
|
|
395
|
+
//Despite of the name, this method can be used to retreive
|
|
396
|
+
//the thumbnail information for any none scaffold type thumbnail
|
|
351
397
|
const thumbnail = this.getThumbnailForPlot(
|
|
352
398
|
simulation,
|
|
353
399
|
this.entry.thumbnails
|