Merge pull request #182 from ligen52/master

fix bug :https://github.com/DylanVann/react-native-fast-image/issues/181
This commit is contained in:
Dylan Vann 2018-04-19 01:51:10 -04:00 committed by GitHub
commit 3e182dfbac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@
BOOL hasSentOnLoadStart;
BOOL hasCompleted;
BOOL hasErrored;
NSDictionary* sizeParams;
}
- (void)setResizeMode:(RCTResizeMode)resizeMode
@ -24,7 +25,7 @@
- (void)setOnFastImageLoad:(RCTBubblingEventBlock)onFastImageLoad {
_onFastImageLoad = onFastImageLoad;
if (hasCompleted) {
_onFastImageLoad(@{});
_onFastImageLoad(sizeParams);
}
}
@ -108,6 +109,7 @@
@"width":[NSNumber numberWithDouble:image.size.width],
@"height":[NSNumber numberWithDouble:image.size.height]
};
sizeParams = params;
if (_onFastImageLoad) {
_onFastImageLoad(params);
}

View File

@ -9,9 +9,9 @@
"image",
"priority"
],
"homepage": "https://github.com/DylanVann/react-native-fast-image#readme",
"homepage": "https://github.com/ligen52/react-native-fast-image#readme",
"bugs": {
"url": "https://github.com/DylanVann/react-native-fast-image/issues"
"url": "https://github.com/ligen52/react-native-fast-image/issues"
},
"license": "MIT",
"author": "Dylan Vann <dylanvann@gmail.com> (http://dylanvann.com)",
@ -30,7 +30,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/DylanVann/react-native-fast-image.git"
"url": "git+https://github.com/ligen52/react-native-fast-image.git"
},
"scripts": {
"format": "prettier --write --no-semi --single-quote --trailing-comma all ./index.js ./ReactNativeFastImageExample/FastImage/*.js ./react-native-fast-image-server/*.js",