wanghaiqing823 / jcrop

Automatically exported from code.google.com/p/jcrop
0 stars 0 forks source link

Howto use show showPreview and showCoords at same time? #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I don't find a example how to use this both at the same time.

I want to show an Preview field and I want to use the Coords in an form.

In the moment I have this for my Preview:

$(function(){
    $('#jcrop_target').Jcrop({
        onChange: showPreview,
        onSelect: showPreview,
        aspectRatio: 1
    });

});

Original issue reported on code.google.com by profd...@gmail.com on 7 Oct 2009 at 5:04

GoogleCodeExporter commented 8 years ago
You can do this :

            $('#imageToCrop').Jcrop({
                onChange: function(arg1, arg2) {
                    showPreview(arg1, arg2);
                    showCoords(arg1, arg2);
                },
                onSelect: function(arg1, arg2) {
                    showPreview(arg1, arg2);
                    showCoords(arg1, arg2);
                },
                aspectRatio: 1
            });
        };

Original comment by Thomas.B...@gmail.com on 11 Oct 2009 at 7:46

GoogleCodeExporter commented 8 years ago
Thomas can give work exampled (ex. on jsfidle) ?

Original comment by register...@gmail.com on 6 Mar 2013 at 7:17