1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Select most of picture on crop. Fix #98

This commit is contained in:
Thomas Tanghus 2013-05-20 15:11:06 +02:00
parent 620ea28204
commit 18701ef9d9

View File

@ -1398,6 +1398,7 @@ OC.Contacts = OC.Contacts || {
var cropphoto = new Image();
$(cropphoto).load(function () {
var x = 5, y = 5, w = this.width-10, h = this.height-10;
$(this).attr('id', 'cropbox');
$(this).prependTo($dlg).fadeIn();
$(this).Jcrop({
@ -1409,7 +1410,7 @@ OC.Contacts = OC.Contacts || {
bgOpacity: .4,
boxWidth: 400,
boxHeight: 400,
setSelect: [ 100, 130, 50, 50 ]//,
setSelect: [ w, h, x, y ]//,
//aspectRatio: 0.8
});
$container.html($dlg).dialog({
@ -1429,7 +1430,7 @@ OC.Contacts = OC.Contacts || {
$container.remove();
},
open: function(event, ui) {
// Jcrop maybe?
showCoords({x:x,y:y,w:w,h:h});
}
});
}).error(function () {