react-native-slider-picker
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "react-native-slider-picker", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Custom range slide picker for React Native. 🚧 UNDER CONSTRUCTION 🚧", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -24,3 +24,3 @@ /** | ||
// Components | ||
import { StyledSlidePickerCursor } from './StyledSlidePickerCursor'; | ||
import { SliderPickerCursor } from './SliderPickerCursor'; | ||
@@ -169,4 +169,4 @@ //------------------------------------------------------------------------------ | ||
<View style={selectionFillStyles}></View> | ||
{/* StyledSlidePickerCursor button */} | ||
<StyledSlidePickerCursor | ||
{/* SliderPickerCursor button */} | ||
<SliderPickerCursor | ||
minOffset={vw(12.5)} | ||
@@ -173,0 +173,0 @@ maxOffset={vw(85)} |
/** | ||
* react-native-slider-picker - NPM Package | ||
* | ||
* @module /components/Generics/StyledSlidePickerCursor | ||
* @module /SliderPickerCursor | ||
* @description Generic pre-styled slide picker cursor. Animated component that can be dragged within it's parent. | ||
@@ -46,3 +46,3 @@ * @param {Number} minOffset - Optional. X-axis coordinates of left-edge of <StyledSliderPicker>. Component cannot be draggeed left past this point. | ||
//------------------------------------------------------------------------------ | ||
export class StyledSlidePickerCursor extends Component { | ||
export class SliderPickerCursor extends Component { | ||
constructor(props) { | ||
@@ -91,3 +91,3 @@ super(props); | ||
}, | ||
onPanResponderTerminate: (evt, gesture) => { // When user's touch/gesture is move outside of the button/cursor of <StyledSlidePickerCursor> | ||
onPanResponderTerminate: (evt, gesture) => { // When user's touch/gesture is move outside of the button/cursor of <SliderPickerCursor> | ||
this.panResponderReleaseHandler(gesture); | ||
@@ -113,3 +113,3 @@ } | ||
* On componentDidUpdate: | ||
* If previous props for triggerNonDraggablePressLocation and nonDraggablePressLocation are not equal to current props (user has pressed the component outside of <StyledSlidePickerCursor> and triggered an event), execute the nonDraggablePressHandler. | ||
* If previous props for triggerNonDraggablePressLocation and nonDraggablePressLocation are not equal to current props (user has pressed the component outside of <SliderPickerCursor> and triggered an event), execute the nonDraggablePressHandler. | ||
*/ | ||
@@ -135,3 +135,3 @@ componentDidUpdate(prevProps) { | ||
/** | ||
* Event handler for when panResponder moves. Calculates final x-location of drag instance based on sum of gesture distance moved and the most recent position of the <StyledSlidePickerCursor> component within the <Slider>. | ||
* Event handler for when panResponder moves. Calculates final x-location of drag instance based on sum of gesture distance moved and the most recent position of the <SliderPickerCursor> component within the <Slider>. | ||
* @param {Object} gesture - The gestureState object passed as a param to each panResponder callback. | ||
@@ -151,3 +151,3 @@ * @return {Function} Executes this.state.drag.setValue to update x value if sum of gesture change and this.state.latestPosition is within the bounds of the <Slider>. | ||
/** | ||
* Event handler for when panResponder touch event ends. Calculates final x-location of drag instance based on sum of gesture distance moved and the most recent position of the <StyledSlidePickerCursor> component within the <Slider>. Executes callbacks to update state accordingly. | ||
* Event handler for when panResponder touch event ends. Calculates final x-location of drag instance based on sum of gesture distance moved and the most recent position of the <SliderPickerCursor> component within the <Slider>. Executes callbacks to update state accordingly. | ||
* @param {Object} gesture - The gestureState object passed as a param to each panResponder callback. | ||
@@ -213,3 +213,3 @@ * @return {Function} Exectues props.releaseCallback(), this.state.drag.setValue(), updates this.state.latestPosition, and this.state.drag.flattenOffset(). | ||
/** | ||
* Handler function when the parent <Slider> component is pressed anywhere outside of the <StyledSlidePickerCursor> component. Get's nearest number and offset of the touch event's x-axis coordinates, moves the button to the appropriate spot in the <Slider>, updates state locally and hoists state up to <Slider> to display purposes. | ||
* Handler function when the parent <Slider> component is pressed anywhere outside of the <SliderPickerCursor> component. Get's nearest number and offset of the touch event's x-axis coordinates, moves the button to the appropriate spot in the <Slider>, updates state locally and hoists state up to <Slider> to display purposes. | ||
* @param {Number} locationX - The value of nativeEvent.locationX where <Slider> component is pressed. | ||
@@ -216,0 +216,0 @@ * @return {Function} Exectues props.releaseCallback(), this.state.drag.setValue(), updates this.state.latestPosition, and this.state.drag.flattenOffset(). |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
26408