diff --git a/web-frontend/src/elements/record/RecordView.scss b/web-frontend/src/elements/record/RecordView.scss index 48115f9..42ccf77 100644 --- a/web-frontend/src/elements/record/RecordView.scss +++ b/web-frontend/src/elements/record/RecordView.scss @@ -35,9 +35,18 @@ width: 100%; height: 100%; display: flex; - flex-direction: row; + flex-direction: column; justify-content: center; align-items: center; + + .structure-view-info { + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + justify-content: space-evenly; + align-items: end; + } } .spectrum-peak-table-view { diff --git a/web-frontend/src/elements/record/RecordView.tsx b/web-frontend/src/elements/record/RecordView.tsx index a3cf0d1..d67dd1e 100644 --- a/web-frontend/src/elements/record/RecordView.tsx +++ b/web-frontend/src/elements/record/RecordView.tsx @@ -20,7 +20,8 @@ function RecordView({ record }: inputProps) { }, [record]); const containerRef = useRef(null); - const { height: containerHeight } = useContainerDimensions(containerRef); + const { width: containerWidth, height: containerHeight } = + useContainerDimensions(containerRef); const chartContainerRef = useRef(null); const { width: chartContainerWidth } = useContainerDimensions(chartContainerRef); @@ -51,15 +52,23 @@ function RecordView({ record }: inputProps) { Accession {record.accession} - +
- {record.compound.smiles && record.compound.smiles !== '' ? ( + {record.compound.smiles && + record.compound.smiles !== '' && + containerWidth > 0 ? ( ) : undefined} +
+ + +
@@ -78,12 +87,14 @@ function RecordView({ record }: inputProps) { - InChI - {record.compound.inchi} + Authors + + {record.authors.map((a) => a.name).join(', ')} + - SMILES - {record.compound.smiles} + Publication + {record.publication} Spectrum @@ -135,19 +146,15 @@ function RecordView({ record }: inputProps) { - Date - {record.date.created} - - - Authors + InChI - {record.authors.map((a) => a.name).join(', ')} + {record.compound.inchi} - Publication + SMILES - {record.publication} + {record.compound.smiles} @@ -158,6 +165,10 @@ function RecordView({ record }: inputProps) { License {record.license} + + Date + {record.date.created} + @@ -165,20 +176,22 @@ function RecordView({ record }: inputProps) { [ record.accession, record.compound.smiles, - record.compound.mass, - record.compound.formula, record.compound.names, record.compound.classes, record.compound.inchi, + record.compound.mass, + record.compound.formula, record.title, + record.peak.peak.values, + record.peak.splash, + record.peak.annotation, record.date.created, record.authors, record.publication, record.copyright, record.license, - record.peak.peak.values, - record.peak.splash, - record.peak.annotation, + containerWidth, + containerHeight, chartHeight, handleOnZoom, chartWidth,