@ldn0x7dc/react-native-view-pager
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -148,11 +148,20 @@ import React, { PropTypes, Component } from 'react'; | ||
style: [page.props.style, { | ||
width: this.state.width, | ||
height: this.state.height, | ||
width: width, | ||
height: height, | ||
position: 'relative', | ||
marginLeft: 0, | ||
marginRight: rowID === this.pageCount - 1 ? 0 : this.props.pageMargin, | ||
}] | ||
}; | ||
const element = React.createElement(page.type, newProps); | ||
return React.createElement(page.type, newProps); | ||
if(this.props.pageMargin > 0 && rowID > 0) { | ||
//Do not using margin style to implement pageMargin. The ListView seems calculate a wrong width for children views with margin. | ||
return ( | ||
<View style={{width: width + this.props.pageMargin, height: height, alignItems: 'flex-end'}}> | ||
{element} | ||
</View> | ||
); | ||
} else { | ||
return element; | ||
} | ||
} | ||
@@ -159,0 +168,0 @@ |
{ | ||
"name": "@ldn0x7dc/react-native-view-pager", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "library/ViewPager.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10494
232