Jump to content

ips.utils.anim.go() doesn't seem to defer properly


Go to solution Solved by Stuart Silvester,

Recommended Posts

updating one of my apps, i decided to give the the JS a good dusting to see where i could improve it cause it was a bit long in the tooth.  I noticed i was using my own $.Deferred code to know when the animation was done executing (i'm using ips.utils.anim.go() for some of the animation and jquery ui for some of the others). I couldn't exactly remember why i had setup my own defer, so i tested it out. i removed mine, placed a .promise().done() on the jquery ui effects i was using, worked as expected, then i moved onto the IPS ones and it was not working as expected. the promise is returned instantly, long before the animation is done executing. i tested out a few things, but the same result. I went searching for instances where in your code you are waiting for the defer before executing some code, and my code was virtually identical.  the expected is the promise to be returned when the animation is done executing like it is done in jquery, other wise there is little value to deferring it in the first place if it is instantly going to return the promise long before the animation is done. 

Edited by CodingJungle
Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

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