Last active
April 9, 2018 08:03
-
-
Save dbismut/87054782fc29d3661db7266387241cd3 to your computer and use it in GitHub Desktop.
Part 2 - Setting this.from and this.to for 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
onExit = () => { | |
// we don't want the code to run if there is no | |
// preview element to transition to. | |
if (!this.preview) return; | |
this.from = { | |
top: 0, | |
height: this.post.offsetHeight, | |
width: this.post.offsetWidth, | |
borderRadius: this.postStyler.get('borderRadius') | |
}; | |
this.to = this.getPreviewStyleAndPosition(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment