|
|
@ -41,7 +41,11 @@ define('pictureCropper', ['translator', 'cropper'], function (translator, croppe
|
|
|
|
backdrop: 'static',
|
|
|
|
backdrop: 'static',
|
|
|
|
}).modal('show');
|
|
|
|
}).modal('show');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set cropper image max-height based on viewport
|
|
|
|
|
|
|
|
var cropBoxHeight = parseInt($(window).height() / 2, 10);
|
|
|
|
var img = document.getElementById('cropped-image');
|
|
|
|
var img = document.getElementById('cropped-image');
|
|
|
|
|
|
|
|
$(img).css('max-height', cropBoxHeight);
|
|
|
|
|
|
|
|
|
|
|
|
var cropperTool = new cropper.default(img, {
|
|
|
|
var cropperTool = new cropper.default(img, {
|
|
|
|
aspectRatio: data.aspectRatio,
|
|
|
|
aspectRatio: data.aspectRatio,
|
|
|
|
autoCropArea: 1,
|
|
|
|
autoCropArea: 1,
|
|
|
|