react-native-slider-picker
Advanced tools
Comparing version 1.0.48 to 1.0.49
{ | ||
"name": "react-native-slider-picker", | ||
"version": "1.0.48", | ||
"version": "1.0.49", | ||
"description": "Custom range slide picker for React Native.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -467,24 +467,22 @@ /** | ||
if (this.showNumberScale) { | ||
// For 0 through this.maxValue, push a styled button into numbers. | ||
// Will be rendered in JSX below. | ||
for (let i = 0; i <= this.maxValue; i++) { | ||
// For 0 through this.maxValue, push a styled button into numbers. | ||
// Will be rendered in JSX below. | ||
for (let i = 0; i <= this.maxValue; i++) { | ||
// Initialize width variable to set the width of each TouchableHighlight. | ||
// Default value is the rounded down - numbersContainers width divided by this.maxValue - 0 (number of options). | ||
let width = Math.floor(vw(this.widthPercentage) / (this.maxValue)); | ||
// If first TouchableHighlight, add extra width to account for the width of separatorLine. | ||
width = i === 0 ? width + ((vw(1) / 3) * 2) : width; | ||
// Initialize width variable to set the width of each TouchableHighlight. | ||
// Default value is the rounded down - numbersContainers width divided by this.maxValue - 0 (number of options). | ||
let width = Math.floor(vw(this.widthPercentage) / (this.maxValue)); | ||
// If first TouchableHighlight, add extra width to account for the width of separatorLine. | ||
width = i === 0 ? width + ((vw(1) / 3) * 2) : width; | ||
// Push styled TouchableHighlight | ||
numbers.push( | ||
<TouchableHighlight | ||
key={i} | ||
style={[styles.buttonTouchable, { width: width }]} // Add width here | ||
> | ||
<Text style={numberStyle}>{i}</Text> | ||
</TouchableHighlight> | ||
) | ||
} | ||
// Push styled TouchableHighlight | ||
numbers.push( | ||
<TouchableHighlight | ||
key={i} | ||
style={[styles.buttonTouchable, { width: width }]} // Add width here | ||
> | ||
<Text style={numberStyle}>{i}</Text> | ||
</TouchableHighlight> | ||
) | ||
} | ||
@@ -496,2 +494,8 @@ | ||
// If no separators are being displayed, | ||
if (!this.showSeparatorScale) { | ||
// Add some top margin to account for spacing | ||
numberContainerStyles['marginTop'] = this.scaleNumberFontSize * .75; | ||
} | ||
return ( | ||
@@ -498,0 +502,0 @@ <View style={numberContainerStyles}> |
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
54551
805