Commit 27b7eff52558e5a8d9db5c5f2fe12bc0f0a2ade8
1 parent
7b5c12d6
Exists in
master
and in
2 other branches
Modified news crop to render with proper width and height
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
amadeus/static/js/crop_news.js
... | ... | @@ -14,14 +14,16 @@ $(function () { |
14 | 14 | |
15 | 15 | /* Scripts da caixa de corte da imagem */ |
16 | 16 | var $image = $("#image"); |
17 | - var cropBoxData; | |
17 | + var cropBoxData = {"width":700,"height":200}; | |
18 | 18 | var canvasData; |
19 | 19 | $("#modalCrop").on("shown.bs.modal", function () { |
20 | 20 | $image.cropper({ |
21 | - viewMode: 1, | |
22 | - aspectRatio: 1/1, | |
21 | + cropBoxResizable: false, | |
22 | + viewMode: 1 , | |
23 | + aspectRatio: 4/3, | |
23 | 24 | minCropBoxWidth: 700, |
24 | 25 | minCropBoxHeight: 200, |
26 | + dragMode: 'move', | |
25 | 27 | ready: function () { |
26 | 28 | $image.cropper("setCanvasData", canvasData); |
27 | 29 | $image.cropper("setCropBoxData", cropBoxData); | ... | ... |