Skip to content

Commit

Permalink
fix: remove useless cropper-hide class from cropper image
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Nov 19, 2022
1 parent 0c75b66 commit 3176f04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## next

- Remove useless `cropper-hide` class from cropper image.
- Check whether the parent node exists or not before removing the cropper container.

## 1.5.12 (Jun 12, 2021)
Expand Down
6 changes: 2 additions & 4 deletions src/js/cropper.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,8 @@ class Cropper {
// Inserts the cropper after to the current image
container.insertBefore(cropper, element.nextSibling);

// Show the image if is hidden
if (!this.isImg) {
removeClass(image, CLASS_HIDE);
}
// Show the hidden image
removeClass(image, CLASS_HIDE);

this.initPreview();
this.bind();
Expand Down

0 comments on commit 3176f04

Please sign in to comment.