mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-12 06:54:28 +01:00
Select most of picture on crop. Fix #98
This commit is contained in:
parent
620ea28204
commit
18701ef9d9
@ -1398,6 +1398,7 @@ OC.Contacts = OC.Contacts || {
|
|||||||
|
|
||||||
var cropphoto = new Image();
|
var cropphoto = new Image();
|
||||||
$(cropphoto).load(function () {
|
$(cropphoto).load(function () {
|
||||||
|
var x = 5, y = 5, w = this.width-10, h = this.height-10;
|
||||||
$(this).attr('id', 'cropbox');
|
$(this).attr('id', 'cropbox');
|
||||||
$(this).prependTo($dlg).fadeIn();
|
$(this).prependTo($dlg).fadeIn();
|
||||||
$(this).Jcrop({
|
$(this).Jcrop({
|
||||||
@ -1409,7 +1410,7 @@ OC.Contacts = OC.Contacts || {
|
|||||||
bgOpacity: .4,
|
bgOpacity: .4,
|
||||||
boxWidth: 400,
|
boxWidth: 400,
|
||||||
boxHeight: 400,
|
boxHeight: 400,
|
||||||
setSelect: [ 100, 130, 50, 50 ]//,
|
setSelect: [ w, h, x, y ]//,
|
||||||
//aspectRatio: 0.8
|
//aspectRatio: 0.8
|
||||||
});
|
});
|
||||||
$container.html($dlg).dialog({
|
$container.html($dlg).dialog({
|
||||||
@ -1429,7 +1430,7 @@ OC.Contacts = OC.Contacts || {
|
|||||||
$container.remove();
|
$container.remove();
|
||||||
},
|
},
|
||||||
open: function(event, ui) {
|
open: function(event, ui) {
|
||||||
// Jcrop maybe?
|
showCoords({x:x,y:y,w:w,h:h});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).error(function () {
|
}).error(function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user