Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Remove commented out swiping code #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/image-zoom/image-zoom.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,26 +311,6 @@ export default class ImageViewer extends React.Component<ImageZoomProps, ImageZo
if (this.props.imageHeight * this.scale > 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) {
Expand Down