Skip to content

Commit

Permalink
Fix image scaling (#23641)
Browse files Browse the repository at this point in the history
Summary:
An updated version of: #22009, this compares the correct image size.

[iOS] [Fixed] - Compare network image sizes correctly
Pull Request resolved: #23641

Differential Revision: D14210991

Pulled By: hramos

fbshipit-source-id: 079053ef4a8f0e62da6eead9afc8de9285b35966
  • Loading branch information
ericlewis authored and facebook-github-bot committed Feb 25, 2019
1 parent 972f399 commit b758d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Image/RCTImageView.m
Expand Up @@ -412,8 +412,8 @@ - (void)reactSetFrame:(CGRect)frame
return;
}

// Don't reload if the current image size is the maximum size of the image source
CGSize imageSourceSize = _imageSource.size;
// Don't reload if the current image size is the maximum size of either the pending image source or image source
CGSize imageSourceSize = (_imageSource ? _imageSource : _pendingImageSource).size;
if (imageSize.width * imageScale == imageSourceSize.width * _imageSource.scale &&
imageSize.height * imageScale == imageSourceSize.height * _imageSource.scale) {
return;
Expand Down

0 comments on commit b758d63

Please sign in to comment.