mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fix image scaling (#23641)
Summary: An updated version of: #22009, this compares the correct image size. [iOS] [Fixed] - Compare network image sizes correctly Pull Request resolved: https://github.com/facebook/react-native/pull/23641 Differential Revision: D14210991 Pulled By: hramos fbshipit-source-id: 079053ef4a8f0e62da6eead9afc8de9285b35966
This commit is contained in:
committed by
Facebook Github Bot
parent
972f39985a
commit
b758d63bc9
@@ -412,8 +412,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user