Socket
Socket
Sign inDemoInstall

@ldn0x7dc/react-native-view-pager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ldn0x7dc/react-native-view-pager - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

22

library/ViewPager.js

@@ -31,3 +31,3 @@ import React, { PropTypes, Component } from 'react';

onPageScroll: PropTypes.func,
}
};

@@ -39,3 +39,3 @@ static defaultProps = {

pageDataArray: [],
}
};

@@ -52,3 +52,3 @@ constructor(props) {

this.currentPage = 0;
this.currentPage; //not initialized
this.pageCount = 0;

@@ -101,6 +101,8 @@ this.initialPageSettled = false;

onResponderRelease(evt, gestureState) {
onResponderRelease(evt, gestureState, disableSettle) {
this.activeGesture = false;
this.changePageScrollState('settling');
this.settlePage(gestureState.vx);
if(!disableSettle) {
this.settlePage(gestureState.vx);
}
}

@@ -111,2 +113,5 @@

let list = this.props.pageDataArray;
if(!list) {
list = [];
}
this.dataSource = this.dataSource.cloneWithRows(list);

@@ -117,3 +122,3 @@ this.pageCount = list.length;

let gestureResponder = this.gestureResponder;
if(!this.props.scrollEnabled) {
if(!this.props.scrollEnabled || this.pageCount <= 0) {
gestureResponder = {};

@@ -147,2 +152,3 @@ }

...page.props,
ref: page.ref,
style: [page.props.style, {

@@ -260,2 +266,6 @@ width: this.state.width,

}
getScrollOffsetFromCurrentPage() {
return this.scroller.getCurrX() - this.getScrollOffsetOfPage(this.currentPage);
}
}
{
"name": "@ldn0x7dc/react-native-view-pager",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "library/ViewPager.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc