Jump to content

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


Pryme8
 Share

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?

Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...