diff --git a/src/swipe/index.js b/src/swipe/index.js index fd18fdeff..947516082 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -167,8 +167,8 @@ export default createComponent({ this.rect = rect; this.swiping = true; this.active = active; - this.computedWidth = Math.floor(+this.width || rect.width); - this.computedHeight = Math.floor(+this.height || rect.height); + this.computedWidth = +this.width || rect.width; + this.computedHeight = +this.height || rect.height; this.offset = this.getTargetOffset(active); this.children.forEach((swipe) => { swipe.offset = 0; @@ -260,7 +260,7 @@ export default createComponent({ currentPosition = Math.min(currentPosition, -this.minOffset); } - let targetOffset = Math.round(offset - currentPosition); + let targetOffset = offset - currentPosition; if (!this.loop) { targetOffset = range(targetOffset, this.minOffset, 0); }