Commit d0fe356f authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos

Merge branch 'issue_99' into 'master'

It fixes #99 for datasets

Closes #99

See merge request !138
parents f0878a68 eef7619a
......@@ -2,17 +2,24 @@ import React, { Component } from 'react'
import { Image } from 'react-bootstrap';
import { getFileByEventId } from '../../api/icat/icatPlus.js';
import PropTypes from 'prop-types';
import ImageZoom from 'react-medium-image-zoom';
export default class GalleryDatasetThumbnail extends Component {
render() {
var gallery = this.props.dataset.parameters.filter(function (o) { return o.name === "ResourcesGallery" });
var name = this.props.dataset.parameters.filter(function (o) { return o.name === "name" });
if (gallery != null) {
if (gallery.length > 0) {
gallery = gallery[0].value.split(" ");
if (gallery.length > this.props.index) {
var url = getFileByEventId(this.props.sessionId, this.props.dataset.investigation.id, gallery[this.props.index] );
return <Image src={url} thumbnail />;
return <ImageZoom image={{
src: url,
alt: "test",
className: 'thumbnail',
}} />;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment