Closed davidelanfranchi closed 7 years ago
Hello @luruke, you narrowed down my problem. The correct way to concatenate the promises:
Promise
.all([this.newContainerLoading, this.scrollToEnd()])
.then(this.enlargeOverlay)
.then(this.fadeOut.bind(this))
.then(this.fadeIn.bind(this));
Thanks again and have a good day!
Hello @luruke and hello everyone,
I can't manage to make the functions of my the promise queue follow the right order. Obviously, I'm not understanding something related to the deferred utility :). Do you have any advice?
This is my code:
This is the log:
The problem is that all the functions, with the exception of the last one, fire immediately and the transitions happen together.
The whole queue is fired together and it seems that the first 'deferred.resolve()' call fires the last function ('this.fadeIn.bind(this)'). I say this because in the 'scrollToEnd' function I check if the page is at the end. If the page is at the end the deferred.resolve() function fires immediately and the last function is called.
What I'm not seeing? :) Thanks for your help (and for your library ;))!