diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.js index 57eea04782..752499f34f 100644 --- a/public/src/client/account/edit.js +++ b/public/src/client/account/edit.js @@ -224,6 +224,22 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator', viewMode: 1 }); + cropperModal.find('.rotate').on('click', function () { + var degrees = this.getAttribute("data-degrees"); + cropperTool.rotate(degrees); + }); + + cropperModal.find('.flip').on('click', function () { + var option = this.getAttribute("data-option"); + var method = this.getAttribute("data-method"); + method === 'scaleX' ? cropperTool.scaleX(option) : cropperTool.scaleY(option); + this.setAttribute("data-option", option * -1); + }); + + cropperModal.find('.reset').on('click', function () { + cropperTool.reset(); + }); + cropperModal.find('.crop-btn').on('click', function () { $(this).addClass('disabled'); var imageData = data.imageType ? cropperTool.getCroppedCanvas().toDataURL(data.imageType) : cropperTool.getCroppedCanvas().toDataURL(); diff --git a/src/views/modals/crop_picture.tpl b/src/views/modals/crop_picture.tpl index d3bf8e075b..4234c43774 100644 --- a/src/views/modals/crop_picture.tpl +++ b/src/views/modals/crop_picture.tpl @@ -11,7 +11,22 @@ - +
+ +
+ +
+ + +
+
+ + +
+
+ +
+