Skip to content

Commit

Permalink
Merge pull request #2139 from tvdeyen/image-cropper-destroy
Browse files Browse the repository at this point in the history
Image cropper destroy
  • Loading branch information
tvdeyen authored Jun 21, 2021
2 parents 137701d + d1ce530 commit 953abfa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion app/views/alchemy/admin/essence_pictures/update.js.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function($) {
Alchemy.ImageCropper.destroy();
Alchemy.closeCurrentDialog();
Alchemy.setElementDirty('#element_<%= @content.element.id %>');
<% if @content.ingredient %>
Expand Down
1 change: 1 addition & 0 deletions package/src/image_cropper.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default class ImageCropper {
this.cropSizeField = document.getElementById(formFieldIds[1])
this.elementId = elementId
this.dialog = Alchemy.currentDialog()
this.dialog.options.closed = this.destroy

this.init()
this.bind()
Expand Down

0 comments on commit 953abfa

Please sign in to comment.