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

Commit cfdfecd

Browse files
Philip KPhilip K
authored andcommitted
add swipeDownThreshold prop
1 parent a522f83 commit cfdfecd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/image-viewer.component.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ export default class ImageViewer extends React.Component<Props, State> {
472472
onClick={this.handleClick}
473473
onDoubleClick={this.handleDoubleClick}
474474
enableSwipeDown={this.props.enableSwipeDown}
475+
swipeDownThreshold={this.props.swipeDownThreshold}
475476
onSwipeDown={this.handleSwipeDown}
476477
pinchToZoom={this.props.enableImageZoom}
477478
enableDoubleClickZoom={this.props.enableImageZoom}
@@ -541,6 +542,7 @@ export default class ImageViewer extends React.Component<Props, State> {
541542
imageWidth={width}
542543
imageHeight={height}
543544
enableSwipeDown={this.props.enableSwipeDown}
545+
swipeDownThreshold={this.props.swipeDownThreshold}
544546
onSwipeDown={this.handleSwipeDown}
545547
pinchToZoom={this.props.enableImageZoom}
546548
enableDoubleClickZoom={this.props.enableImageZoom}

src/image-viewer.type.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export class Props {
6666
*/
6767
public enableSwipeDown?: boolean = false;
6868

69+
/**
70+
* threshold for firing swipe down function
71+
*/
72+
public swipeDownThreshold?: number;
73+
6974
public doubleClickInterval?: number;
7075

7176
/**

0 commit comments

Comments
 (0)