preselection d'un nouveau avatar
This commit is contained in:
parent
4c707c5899
commit
569f3a5860
|
@ -49,5 +49,24 @@
|
|||
|
||||
$(window).load(function () {
|
||||
$('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
|
||||
|
||||
|
||||
var selection = new Object();
|
||||
if($('#largeimg').height()<$('#largeimg').width()) {
|
||||
selection.width = $('#largeimg').height();
|
||||
selection.height = $('#largeimg').height();
|
||||
}
|
||||
else {
|
||||
selection.width = $('#largeimg').width();
|
||||
selection.height = $('#largeimg').width();
|
||||
}
|
||||
|
||||
selection.x1=0;
|
||||
selection.x2=0;
|
||||
selection.y1=0;
|
||||
selection.y2=0;
|
||||
|
||||
preview($('#largeimg'),selection);
|
||||
|
||||
});
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue