Skip to content

Commit

Permalink
fix: recompute size when objectFit is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinH committed Sep 6, 2023
1 parent 446fdd2 commit 2194639
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Cropper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class Cropper extends React.Component<CropperProps, State> {
this.recomputeCropPosition()
} else if (prevProps.aspect !== this.props.aspect) {
this.computeSizes()
} else if (prevProps.objectFit !== this.props.objectFit) {
this.computeSizes()
} else if (prevProps.zoom !== this.props.zoom) {
this.recomputeCropPosition()
} else if (
Expand Down

0 comments on commit 2194639

Please sign in to comment.