Last active
April 9, 2018 08:04
-
-
Save dbismut/1635f5e139bcfcd87218f0fe2534f518 to your computer and use it in GitHub Desktop.
Part 2 - Animating the exiting transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
executeExitingTransition = (node, done) => { | |
spring({ | |
from: this.from, | |
to: this.to, | |
stiffness: 100, | |
damping: 12, | |
restDelta: true, | |
restSpeed: 0.1 | |
}).start({ | |
update: this.postStyler.set, | |
complete: () => { | |
const scrollTop = -this.pageListStyler.get('top'); | |
this.pageListStyler.set({ position: 'absolute', top: 0 }); | |
windowScroll.set('top', scrollTop); | |
done(); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment