From c8bcb38db0e48db9fb88f976cecd7433cf6033ad Mon Sep 17 00:00:00 2001 From: Jakub Gonet Date: Sun, 6 Sep 2020 19:18:41 +0200 Subject: [PATCH] Remove commented out swiping code --- src/image-zoom/image-zoom.component.tsx | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/image-zoom/image-zoom.component.tsx b/src/image-zoom/image-zoom.component.tsx index e06c90f..8bc51fb 100644 --- a/src/image-zoom/image-zoom.component.tsx +++ b/src/image-zoom/image-zoom.component.tsx @@ -311,26 +311,6 @@ export default class ImageViewer extends React.Component this.props.cropHeight) { this.positionY += diffY / this.scale; this.animatedPositionY.setValue(this.positionY); - - // 如果图片上边缘脱离屏幕上边缘,则进入 swipeDown 动作 - // if ( - // (this.props.imageHeight / 2 - this.positionY) * this.scale < - // this.props.cropHeight / 2 - // ) { - // if (this.props.enableSwipeDown) { - // this.swipeDownOffset += diffY - - // // 只要滑动溢出量不小于 0,就可以拖动 - // if (this.swipeDownOffset > 0) { - // this.positionY += diffY / this.scale - // this.animatedPositionY.setValue(this.positionY) - - // // 越到下方,缩放越小 - // this.scale = this.scale - diffY / 1000 - // this.animatedScale.setValue(this.scale) - // } - // } - // } } else { // swipeDown 不允许在已经有横向偏移量时触发 if (this.props.enableSwipeDown && !this.isHorizontalWrap) {