jCrop (jQuery) sometimes fails to load image/cropper area

后端 未结 6 1627
一个人的身影
一个人的身影 2021-02-07 08:46

I\'ve got a pretty simple problem, but I\'ve become clueless on what is causing the problem. In one of my applications I\'m using jCrop as a small add-on to crop images to fit i

6条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 08:49

    I know this is old, but it was happening randomly to my install recently. Found that it was due to images not being full loaded before before jCrop intialized.

    All it took to fix it was wrapping the jCrop initialization stuff inside of a

    $(window).on("load", function () { //jcrop stuff here });

    And it has been working well since.

提交回复
热议问题