From 7f10166637bd252bfba888da8ea60bc886e7308a Mon Sep 17 00:00:00 2001 From: dntzhang Date: Mon, 1 Jul 2019 16:02:23 +0800 Subject: [PATCH] phy-scroll - publish v1.0.3 --- packages/phy-scroll/index.js | 6 +++--- packages/phy-scroll/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/phy-scroll/index.js b/packages/phy-scroll/index.js index c0555cfd0..1a3ff2f1c 100644 --- a/packages/phy-scroll/index.js +++ b/packages/phy-scroll/index.js @@ -1,4 +1,4 @@ -/* phy-scroll v1.0.2 +/* phy-scroll v1.0.3 * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi/tree/master/packages/phy-scroll * MIT Licensed. @@ -402,13 +402,13 @@ if (result > this.max) result = this.max; if (result < this.min) result = this.min; this.to(result, time, ease); - this.index = rpt + 1 + this.index = (value < 0 ? -1 : 1) * (rpt + 1) } else { result = (value < 0 ? -1 : 1) * rpt * this.step; if (result > this.max) result = this.max; if (result < this.min) result = this.min; this.to(result, time, ease); - this.index = rpt + this.index = (value < 0 ? -1 : 1) * rpt } }, destroy: function () { diff --git a/packages/phy-scroll/package.json b/packages/phy-scroll/package.json index 223380521..eb47b917b 100644 --- a/packages/phy-scroll/package.json +++ b/packages/phy-scroll/package.json @@ -1,6 +1,6 @@ { "name": "phy-scroll", - "version": "1.0.2", + "version": "1.0.3", "description": "Physical scroll.", "main": "index.js", "scripts": {