Skip to content

Commit

Permalink
add cropSize change (#109)
Browse files Browse the repository at this point in the history
Co-authored-by: Shair <SSBazarbaev@sberbank.ru>
  • Loading branch information
FillPower1 and Shair authored Apr 1, 2020
1 parent 27e320a commit debf6be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class Cropper extends React.Component<Props, State> {
this.computeSizes()
} else if (prevProps.zoom !== this.props.zoom) {
this.recomputeCropPosition()
} else if (prevProps.cropSize !== this.props.cropSize) {
this.computeSizes()
}
if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
this.props.zoomWithScroll
Expand Down

0 comments on commit debf6be

Please sign in to comment.