🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

scrollable

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrollable - npm Package Compare versions

Comparing version

to
1.0.3

2

package.json
{
"name": "scrollable",
"version": "1.0.2",
"version": "1.0.3",
"description": "Components for layer composition and scrolling with React.js",

@@ -5,0 +5,0 @@ "main": "src/scrollable.js",

@@ -30,2 +30,4 @@ ## React Scrollable

Open `http://localhost:8080/examples/` after starting up the server to check out the examples.
##### Development auto-watch unit tests (without coverage)

@@ -32,0 +34,0 @@

@@ -42,2 +42,9 @@ /* Copyright 2015, Yahoo Inc.

function inViewport (touch) {
return touch.pageX >= 0 &&
touch.pageX <= window.innerWidth,
touch.pageY >= 0 &&
touch.pageY <= window.innerHeight;
}
var members = {

@@ -138,2 +145,14 @@ _disabled: false,

var scroller = this._scroller;
/*
If gesture ends outside a webview we don't get a touchEnd event
so scroll never ends
The way to fix that is by checking that the touchMove
was triggered outside the viewport bounds and force
the scroll to end
*/
if (!inViewport(event.touches[0])){
return this._touchEnd(event);
}
if (!this._isParentScrolling && !this._disabled) {

@@ -140,0 +159,0 @@ scroller.doTouchMove(event.touches, event.timeStamp, event.scale);