From c9145e80099ad4a59b03bda2911fe575f356b4ef Mon Sep 17 00:00:00 2001 From: eddy Date: Wed, 4 Jan 2017 11:30:05 +0800 Subject: [PATCH 1/2] Update swipe.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自动滑动的时候,如果中途用手指滑动,自动滑动将会停止。 --- swipe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swipe.js b/swipe.js index 8b29717..5f077da 100644 --- a/swipe.js +++ b/swipe.js @@ -309,7 +309,7 @@ function Swipe(container, options) { event.preventDefault(); // stop slideshow - stop(); + //stop(); // increase resistance if first or last slide if (options.continuous) { // we don't add resistance at the end From 93db9075017b74f21a083ab828ebba17b96b250d Mon Sep 17 00:00:00 2001 From: eddy Date: Wed, 4 Jan 2017 11:39:54 +0800 Subject: [PATCH 2/2] Update swipe.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 手Q中(其他浏览器相同)当前页面有自动滑动功能,点击页面链接进入其他页面再返回,原来的自动滑动的速度变快,多切换几次不断变快。每次开始设置滑动时,清除之前的滑动操作,可避免此问题。 --- swipe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swipe.js b/swipe.js index 5f077da..8e26f27 100644 --- a/swipe.js +++ b/swipe.js @@ -217,7 +217,8 @@ function Swipe(container, options) { var interval; function begin() { - + //clear history or Sliding speed faster and faster + clearTimeout(interval); interval = setTimeout(next, delay); }