Last active
April 9, 2018 07:54
-
-
Save dbismut/38dba0f2076b1981c945a4f1a86eb941 to your computer and use it in GitHub Desktop.
Part 2 - Setting onEnter function - referencing the preview node
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
onEnter = () => { | |
const { post } = this.props.route.data; | |
this.preview = document.querySelector(`.preview[data-id="${post.id}"]`); | |
this.pageList = document.querySelector('.page-list'); | |
this.pageListStyler = styler(this.pageList); | |
this.from = this.getPreviewStyleAndPosition(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment