Discussion:
[Proto-Scripty] Image dropping to canvas is not working properly
Manjula Asirwatham
2016-07-06 07:32:11 UTC
Permalink
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.
--
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-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Walter Lee Davis
2016-07-06 12:51:32 UTC
Permalink
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.
Visit this group at https://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
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-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Loading...