Skip to content

Commit

Permalink
Group carousel resolution single decimal point
Browse files Browse the repository at this point in the history
  • Loading branch information
bioinsilico committed Jul 23, 2024
1 parent f669790 commit df8575a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[Semantic Versioning](https://semver.org/)

## [6.1.1] - 2024-07-23
### Improvement
- Group carousel resolution single decimal point

## [6.1.0] - 2024-05-16
### New feature
- New track builder `UnmodeledTrackBuilder` that merges unmodeled tracks from instances
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rcsb/rcsb-saguaro-app",
"version": "6.1.0",
"version": "6.1.1",
"description": "RCSB 1D Saguaro Web App",
"main": "build/app.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export class GroupMemberItem extends React.Component<GroupMemberItemInterface,{}
<div style={{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}><strong>Organism: </strong>{this.props.item.taxNames.join(", ")}</div>
<div style={{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}} title={this.props.item.experimentalMethod}><strong>Experimental Method: </strong>{this.props.item.experimentalMethod ?? NA}</div>
{
(<div style={{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}><strong>Resolution: </strong>{this.props.item.resolution ? `${this.props.item.resolution} Å` : NA}</div>)
(<div style={{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}>
<strong>Resolution: </strong>{this.props.item.resolution ? `${formatRes(this.props.item.resolution)} Å` : NA}
</div>)
}
{
this.props.item.molecularWeight ? (<div style={{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}><strong>Molecular Weight: </strong>{`${this.props.item.molecularWeight} kDa`}</div>) : null
Expand All @@ -71,6 +73,10 @@ export class GroupMemberItem extends React.Component<GroupMemberItemInterface,{}
}
}

function formatRes(x: number): number {
return Math.round(x*10) / 10;
}

function memberImgUrl(ei: ItemFeaturesInterface, groupProvenanceId: GroupProvenanceId): string{
if(groupProvenanceId === GroupProvenanceId.ProvenanceMatchingDepositGroupId)
return resource.rcsb_cdn.url + ei.entryId.toLowerCase().substring(1, 3) + "/" + ei.entryId.toLowerCase() + "/" + ei.entryId.toLowerCase() + "_model-1.jpeg";
Expand Down

0 comments on commit df8575a

Please sign in to comment.