Skip to content

Commit

Permalink
Merge pull request Expensify#855 from Expensify/Rory-FixModalImageHeight
Browse files Browse the repository at this point in the history
Fix modal image height
  • Loading branch information
bondydaa authored Nov 30, 2020
2 parents 05cdbde + e890577 commit f5714d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/BaseImageModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class BaseImageModal extends React.Component {
if (this.state.isModalOpen && !this.calculatedModalImageSize) {
Image.getSize(this.props.sourceURL, (width, height) => {
// Unlike the image width, we do allow the image to span the full modal height
const modalHeight = this.props.pinToEdges ? Dimensions.get('window').height : this.props.modalHeight;
const modalHeight = this.props.pinToEdges
? Dimensions.get('window').height
: this.props.modalHeight - (styles.modalHeaderBar.height || 0);
const modalWidth = this.props.pinToEdges ? Dimensions.get('window').width : this.props.modalImageWidth;
let imageHeight = height;
let imageWidth = width;
Expand Down

0 comments on commit f5714d6

Please sign in to comment.