Closed umutesen closed 4 years ago
Try to wrap your code in setTimeout function with some delay, 3-4s. This error can occur because script has not load yet, but you already start use it.
As the canvas was on the page fully loaded prior to resizing as a result of a button click, my understanding was that there would be no need to load the script again. Your suggestion seems to work with a timeout of 500ms, could it take as long as 3-4 seconds to load the script?
The error may be in Celestial.resize, which also takes a config object as argument, so Celestial.resize(width: 800);
should work. (width is the only parameter it checks, though)
Of course, this function should really be polymorphic, call it empty, get the current width, call it with a number or a correctly formatted object, take that as it appears to be. so I did just that in the latest version (0.7.9). I may eventually get around to let it take an anonymous function as well.
Yes, the error occurs in resize method. The timeout works, however, the resize takes place after some time and it is noticeable in the UI so it is slightly bad experience.
Is 0.7.9 available to try?
It is now
I am getting the following exception when I use the resize method on Chrome under MacOS:
Any ideas what might be causing it?