summaryrefslogtreecommitdiff
path: root/js/jcrop/jquery.Jcrop.go.js
diff options
context:
space:
mode:
authorRobin Millette <millette@plantard.controlezvous.ca>2009-01-22 04:22:50 +0000
committerRobin Millette <millette@plantard.controlezvous.ca>2009-01-22 04:22:50 +0000
commit205eb386c542502f39e0df1f4544c10a87d91b4b (patch)
tree48ce8bce829e92f75b305621e056f7c3243b1c70 /js/jcrop/jquery.Jcrop.go.js
parent7f25b9db4bce69e076ab6447a4070d1cb7c3651a (diff)
parent07b52e19beff39a7f7cb5de4ebb199f2d894ad08 (diff)
Merge branch 'master' of /var/www/trunk
Diffstat (limited to 'js/jcrop/jquery.Jcrop.go.js')
-rw-r--r--js/jcrop/jquery.Jcrop.go.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/jcrop/jquery.Jcrop.go.js b/js/jcrop/jquery.Jcrop.go.js
index d5176c14c..b2737407b 100644
--- a/js/jcrop/jquery.Jcrop.go.js
+++ b/js/jcrop/jquery.Jcrop.go.js
@@ -1,7 +1,12 @@
$(function(){
+ var x = ($('#avatar_crop_x').val()) ? $('#avatar_crop_x').val() : 0;
+ var y = ($('#avatar_crop_y').val()) ? $('#avatar_crop_y').val() : 0;
+ var w = ($('#avatar_crop_w').val()) ? $('#avatar_crop_w').val() : $("#avatar_original img").attr("width");
+ var h = ($('#avatar_crop_h').val()) ? $('#avatar_crop_h').val() : $("#avatar_original img").attr("height");
+
jQuery("#avatar_original img").Jcrop({
onChange: showPreview,
- setSelect: [ 0, 0, $("#avatar_original img").attr("width"), $("#avatar_original img").attr("height") ],
+ setSelect: [ x, y, w, h ],
onSelect: updateCoords,
aspectRatio: 1,
boxWidth: 480,