Skip to content

Commit

Permalink
Update image on mousewheel zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-b committed Sep 10, 2019
1 parent 18014c0 commit 648f3d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/assets/javascripts/image_edit.js
Expand Up @@ -62,17 +62,16 @@ ImageEdit.prototype.initCroppie = function () {
}.bind(this)
})
this.previewEl[0].addEventListener('cropend', this.updateResult)
this.previewEl[0].addEventListener('zoom', this.updateResult)
this.rotateEl.parent().on('click', function () {
this.cropper.rotate(-90)
this.updateResult()
}.bind(this))
this.zoomInEl.parent().on('click', function () {
this.cropper.zoom(0.1)
this.updateResult()
}.bind(this))
this.zoomOutEl.parent().on('click', function () {
this.cropper.zoom(-0.1)
this.updateResult()
}.bind(this))
}

Expand Down

0 comments on commit 648f3d7

Please sign in to comment.