From 3dff50509242e040b53437bd78196a249b2428cf Mon Sep 17 00:00:00 2001 From: Michael Kantor Date: Tue, 17 Jan 2017 16:13:58 -0800 Subject: [PATCH 1/2] Adds cancel function --- animatedScrollTo.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/animatedScrollTo.js b/animatedScrollTo.js index bc7d0cb..d1a8794 100644 --- a/animatedScrollTo.js +++ b/animatedScrollTo.js @@ -40,6 +40,9 @@ } }; requestAnimFrame(animateScroll); + return function cancel() { + animating = false; + }; }; if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { From 3ec8f9f746d170fef2d328efd6c58e13bfd70084 Mon Sep 17 00:00:00 2001 From: Michael Kantor Date: Tue, 17 Jan 2017 16:17:45 -0800 Subject: [PATCH 2/2] increment version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4b1ba1..349af99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "animated-scrollto", - "version": "1.1.0", + "version": "1.1.1", "description": "Animated scrolling without any dependency on libraries", "main": "animatedScrollTo.js", "repository": {