Comparing version 1.0.2 to 1.0.3
{ | ||
"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); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
2838
71
1929803
18
1