Sign in to follow this  
Pryme8

.bind('resize', function(){ engine.resize(); Not working

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.