Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

asyncCallback slows down application + fix #141

Open
blueberry-media opened this issue Mar 12, 2015 · 2 comments
Open

asyncCallback slows down application + fix #141

blueberry-media opened this issue Mar 12, 2015 · 2 comments

Comments

@blueberry-media
Copy link

If the asyncCallback is called to fast the timeout is cleared (i think) and the callback is not triggered. To make it async a fix is made with requestAnimationFrame.

            //clearTimeout(timeout);
            //timeout=setTimeout(function() { if ( ft.callback ) { ft.callback(ft, events); } }, 1);
            requestAnimationFrame( function() { if ( ft.callback ) { ft.callback(ft, events); } } );

Could you apply this fix?

@AliasIO
Copy link
Owner

AliasIO commented Mar 14, 2015

requestAnimationFrame is not supported in IE8 and IE9 though.

@blueberry-media
Copy link
Author

Another fix would be to remove the clearTimeout

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant