Image dropping to canvas is not working properly

32 views
Skip to first unread message

Manjula Asirwatham

unread,
Jul 6, 2016, 7:12:06 AM7/6/16
to Prototype & script.aculo.us
Hi,

We have an site www.rightgifting.com which customer can create personalized gifts. we use fabric JS to do the design of the products. But when the customer crop the image is doesn't fall to canvas at first attempt. if we refresh the browser and re do the same it is working sometimes. can you suggest us a solution.

Regards,
Manjula A.

Walter Lee Davis

unread,
Jul 6, 2016, 8:51:38 AM7/6/16
to prototype-s...@googlegroups.com

> On Jul 6, 2016, at 3:32 AM, Manjula Asirwatham <manjula....@gmail.com> wrote:
>
> Hi,
>
> We have an site www.rightgifting.com which customer can create personalized gifts. we use fabric JS to do the design of the products. But when the customer crop the image is doesn't fall to canvas at first attempt. if we refresh the browser and re do the same it is working sometimes. can you suggest us a solution.

If you look in the Web Inspector in Safari (or similar developer console in any other browser) you will see a couple of errors, starting with the missing jQuery 1.8.3 min file. That cascades into a JS reference error "Can't fine variable: exports". I have no idea whether that's relevant to your particular issue (didn't want to hunt around to find the exact page where your canvas drop happens -- could you post a direct link or some directions to reproduce the error?), but in my experience, once you have a JS error in your page, you have a non-trivial chance of having knock-on issues with unrelated scripts in the same page. Try chasing that edge of the problem first, and see if the rest clears up.

These sorts of "Heisenbugs" are particularly painful, but if reloading helps, maybe the problem is in a listener that is not being loaded properly, or maybe it's just HTTP gremlins swallowing your resources every once in a while.

If you're using pjax or Turbolinks to speed up page loads, you may need to load your script on a different event than dom:loaded, since that will only fire once, when the outer page shell loads for the first time (this is one way to end up with a page that works on reload, but not when you navigate to that page through a link).

Walter


>
> Regards,
> Manjula A.
>
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scripta...@googlegroups.com.
> To post to this group, send email to prototype-s...@googlegroups.com.
> Visit this group at https://groups.google.com/group/prototype-scriptaculous.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages