Commit Graph

17 Commits

Author SHA1 Message Date
Dylan Vann c786be22a5 Refactor onLoad event. 2018-04-19 01:54:32 -04:00
李根 9d7ee9ce78 fix bug :https://github.com/DylanVann/react-native-fast-image/issues/181
Dimensions not being passed to onLoad() #181
2018-04-16 17:41:33 +08:00
Dylan Vann 60130cb326 Move width and height to onLoad. Document dimensions event. 2018-03-17 20:05:24 -04:00
Dylan Vann 709312725f
Call onLoadEnd regardless of if onFastImageError is defined.
onLoadEnd should always be called.
Thanks to @kdong007 for pointing this issue out.
2018-03-17 02:42:52 -04:00
Dylan Vann 8279ecda47
Merge pull request #107 from jeremyclee/resource-info-onloadend
Added resource width and height information to the onFastImageLoad an…
2018-03-11 19:35:21 -04:00
Jeremy Lee a3b56dd8b6 added width and height to load end in iOS 2018-03-09 15:38:09 -08:00
Dylan Vann 763e811893 Fix merge issues. 2018-03-07 23:12:10 -05:00
Dylan Vann fd5e7357fa
Merge branch 'master' into dh-ensure-on-load-end-and-on-load-get-called 2018-03-07 23:10:43 -05:00
Dylan Vann 8cafd670bf Make property names consistent and add example. 2018-03-07 23:04:28 -05:00
Dan Hodos d9f7299154 iOS: Ensure onLoad and onLoadEnd get called
Setting properties from JS to native components does not guarantee any
order (as far as I know). Because of this, `setSource` can get called
and complete before `setOnFastImageLoad` and `setOnFastImageLoadEnd`,
which results in the callbacks never firing.

This change implements a simple check for these callback properties
getting set after the image has loaded, and fires them at that time.
2018-03-07 22:10:23 -05:00
Dan Hodos ddebbc146b iOS: Ensure onLoad and onLoadEnd get called
Setting properties from JS to native components does not guarantee any
order (as far as I know). Because of this, `setSource` can get called
and complete before `setOnFastImageLoad` and `setOnFastImageLoadEnd`,
which results in the callbacks never firing.

This change implements a simple check for these callback properties
getting set after the image has loaded, and fires them at that time.
2017-10-19 11:48:22 -05:00
Dylan Vann 1666f7c4e5 Make android and iOS view loading events conform to API of React Native's Image.
This will make using this library as a drop in replacement easier.
This commit also fixes some issues in the android progress implementation.
2017-07-25 00:44:08 -04:00
Dylan Vann 6c720f5020 Fix iOS progress implementation to conform to React Native's image.
Includes:

- onLoadStart
- onProgress
- onError
- onLoad
- onLoadEnd

Also changes to use the prop-types package.
2017-07-23 22:28:35 -04:00
Dylan Vann ad4d8a5fe6 Add progress events for iOS. 2017-07-03 21:58:24 -04:00
Dylan Vann e98bacc84f Fix onLoad and onError on iOS. 2017-04-18 11:57:18 -04:00
Dylan Vann bd6cb0cae4 Remove cancellation code since sd_setImageWithURL already handles cancellation. 2017-04-18 10:53:30 -04:00
Dylan Vann 1ee6d37bd4 🚩 Initial commit. 2017-04-17 18:42:16 -04:00