Skip to content

Commit

Permalink
Add dataset click event from gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
akhuoa committed May 2, 2024
1 parent 32a0fa5 commit 6cbde23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/DatasetCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
:dataset-biolucida="biolucidaData"
:category="currentCategory"
@card-clicked="galleryClicked"
@dataset-clicked="galleryDatasetClicked"
/>
</span>
<div class="card-right">
Expand Down Expand Up @@ -163,6 +164,9 @@ export default {
galleryClicked: function (payload) {
this.propogateCardAction(payload)
},
galleryDatasetClicked: function (payload) {
EventBus.emit('dataset-clicked', payload) // Pass to mapintegratedvuer
},
openDataset: function () {
window.open(this.dataLocation, '_blank')
},
Expand Down
6 changes: 5 additions & 1 deletion src/components/ImageGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:body-style="bodyStyle"
:shadow="shadow"
@card-clicked="cardClicked"
@dataset-clicked="datasetClicked"
ref="gallery"
/>
</div>
Expand Down Expand Up @@ -116,6 +117,9 @@ export default {
cardClicked: function (payload) {
this.$emit('card-clicked', payload)
},
datasetClicked: function (payload) {
this.$emit('dataset-clicked', payload)
},
createSciCurnchItems: function () {
this.updateS3Bucket(this.entry.s3uri)
this.createDatasetItem()
Expand Down Expand Up @@ -171,7 +175,7 @@ export default {
let thumbnailURL = undefined
let mimetype = ''
if (thumbnail) {
thumbnailURL = this.getImageURL(this.envVars.API_LOCATION, {
id,
prefix: this.getS3Prefix(),
Expand Down

0 comments on commit 6cbde23

Please sign in to comment.