react-native-fit-image
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -88,2 +88,3 @@ /// <reference types="react" /> | ||
private onLoadStart; | ||
private onError; | ||
private getHeight; | ||
@@ -90,0 +91,0 @@ private getOriginalHeight; |
@@ -40,2 +40,4 @@ "use strict"; | ||
_this.ImageComponent = react_native_1.ImageBackground || react_native_1.Image; | ||
_this.mounted = false; | ||
_this.sizeStyle = {}; | ||
_this.shouldDisplayIndicator = function () { | ||
@@ -58,2 +60,7 @@ return _this.state.isLoading && _this.props.indicator !== false; | ||
}; | ||
_this.onError = function () { | ||
if (_this.state.isLoading) { | ||
_this.setState({ isLoading: false }); | ||
} | ||
}; | ||
_this.getHeight = function () { | ||
@@ -114,3 +121,5 @@ if (_this.style && _this.style.height) { | ||
} | ||
_this.sizeStyle = { flexGrow: 1 }; | ||
else { | ||
_this.sizeStyle = { flexGrow: 1 }; | ||
} | ||
} | ||
@@ -143,3 +152,3 @@ var originalSize = [props.originalWidth, props.originalHeight]; | ||
var ImageComponent = this.ImageComponent; | ||
return (React.createElement(ImageComponent, __assign({}, this.props, { onLayout: this.onLayout, onLoad: this.onLoad, onLoadStart: this.onLoadStart, source: this.props.source, style: [ | ||
return (React.createElement(ImageComponent, __assign({}, this.props, { onLayout: this.onLayout, onLoad: this.onLoad, onLoadStart: this.onLoadStart, onError: this.onError, source: this.props.source, style: [ | ||
this.style, | ||
@@ -146,0 +155,0 @@ this.sizeStyle, |
{ | ||
"name": "react-native-fit-image", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"description": "Responsive image component to fit perfectly itself.", | ||
@@ -5,0 +5,0 @@ "main": "dist/FitImage.js", |
@@ -28,3 +28,3 @@ # React Native Fit Image [](https://badge.fury.io/js/react-native-fit-image) | ||
<FitImage | ||
source={{ uri: 'https://facebook.github.io/react/img/logo_og.png' }} | ||
source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} | ||
style={styles.fitImage} | ||
@@ -38,3 +38,3 @@ /> | ||
indicatorSize="large" // (small | large) or integer | ||
source={{ uri: 'https://facebook.github.io/react/img/logo_og.png' }} | ||
source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} | ||
style={styles.fitImage} | ||
@@ -45,3 +45,3 @@ /> | ||
<FitImage | ||
source={{ uri: 'https://facebook.github.io/react/img/logo_og.png' }} | ||
source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} | ||
originalWidth={400} | ||
@@ -55,3 +55,3 @@ originalHeight={400} | ||
resizeMode="contain" | ||
source={{ uri: 'https://facebook.github.io/react/img/logo_og.png' }} | ||
source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} | ||
/> | ||
@@ -61,3 +61,3 @@ | ||
<FitImage | ||
source={{ uri: 'https://facebook.github.io/react/img/logo_og.png' }} | ||
source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} | ||
style={styles.fitImageWithSize} | ||
@@ -64,0 +64,0 @@ /> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
387
23603
12
1