Search code examples
javascriptjquerycropaspect-ratiojcrop

What is the method to change the aspectRatio of JCrop?


How do I change the aspectRatio of the JCrop on the fly?

Sorry for the simple question but the all the manual, the documentation and the discussions are on http://deepliquid.com which is dead from yesterday, and I really need to finish something in this evening.

If someone has by any chance the JCrop manual saved could you please upload?


Solution

  • (A little late for @user1236048, but it may be helpful for others.)

    The aspect ratio can be changed using the jCrop API using the setOptions method:

    jcrop_api.setOptions(
    {
        aspectRatio: 2/1
    });