Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setSelection does not work on initial load #6

Open
tadev-au opened this issue Dec 20, 2015 · 1 comment
Open

setSelection does not work on initial load #6

tadev-au opened this issue Dec 20, 2015 · 1 comment

Comments

@tadev-au
Copy link

The setSelection method only seems to work when the component is already visible. There is the following comment in the setSelection source code:
"set the selection of Jcrop programmatically
is only working when the component is already attached to the screen"

My use case is that a user can select and area of an image and the selection coordinates are saved to a database. At a later stage the user should be able to come back and modify the selection and I can't seem to find a way to load the jcrop area with a selection already applied to it.

Is there a way to initialize jcrop with a certain selection that is immediately shown when the component is first loaded? Or is there some kind of workaround to achieve this?

This would be a very useful feature for me.

Thanks for providing the awesome add-on.

@janzankowski
Copy link

+1 - Same use case as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants