Pryme8 Posted February 20, 2016 Share Posted February 20, 2016 I have a jQuery animation where the width of my canvas changes but not the window. the script //ALWAYS LISTEN FOR RESIZE! $(window).bind('resize', function() { engine.resize(); }); $('#renderCanvas').bind('resize', function(){ engine.resize(); }); works on window resizes but not when I call a jquery animation on the canvas. any ideas? Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 23, 2016 Share Posted February 23, 2016 This is a jQuery issue - resize is not called when animation is triggered (even when manipulating the size of the object). You will have to manually trigger a resize once the animation completed, or in the progress callback. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 28, 2016 Author Share Posted February 28, 2016 On 2/23/2016 at 2:27 AM, RaananW said: This is a jQuery issue - resize is not called when animation is triggered (even when manipulating the size of the object). You will have to manually trigger a resize once the animation completed, or in the progress callback. I actually figured that out, and was able to get it working thanks for the responses on my questions though Raa Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.