odyniec / imgareaselect

ImgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those on Flickr).
http://odyniec.net/projects/imgareaselect/
686 stars 197 forks source link

setSelection weird behaviour #70

Open notflip opened 10 years ago

notflip commented 10 years ago

I have the following code

var ias = $('#lightbox_image').imgAreaSelect({ instance: true });

ias.setSelection(0, 0, 50, 50, true);
    ias.setOptions({ show: true });
    ias.setOptions({
        show: true,
        aspectRatio: '1:1',
        parent: '#parent',
        handles: true,
        zIndex: 9999
    });
    ias.update();

This is what's happening, the original setSelection is giving a weird, and unmovable result

pr