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

Commit aa5e15f

Browse files
committed
Expose minScale and maxScale
1 parent a0bd59b commit aa5e15f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/image-viewer.component.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ export default class ImageViewer extends React.Component<Props, State> {
551551
pinchToZoom={this.props.enableImageZoom && !this.state.isShowMenu}
552552
enableDoubleClickZoom={this.props.enableImageZoom && !this.state.isShowMenu}
553553
doubleClickInterval={this.props.doubleClickInterval}
554+
minScale={this.props.minScale}
555+
maxScale={this.props.maxScale}
554556
>
555557
{this!.props!.renderImage!(image.props)}
556558
</ImageZoom>

src/image-viewer.type.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ export class Props {
8181

8282
public doubleClickInterval?: number;
8383

84+
/**
85+
* Min and Max scale for zooming
86+
*/
87+
public minScale?: number;
88+
89+
public maxScale?: number;
90+
8491
/**
8592
* 是否预加载图片
8693
*/

0 commit comments

Comments
 (0)