Skip to content

Instantly share code, notes, and snippets.

@ederchrono
Created May 15, 2019 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ederchrono/1ff9712bc3da3042d144363aedd5018e to your computer and use it in GitHub Desktop.
Save ederchrono/1ff9712bc3da3042d144363aedd5018e to your computer and use it in GitHub Desktop.
// inside computed
currentImageStyle () {
const blur = calculateBlur(this.nextImagePosition)
return {
'left': `${this.currentImagePosition}px`,
'filter': `blur(${blur}px)`
}
},
prevImageStyle () {
const blur = calculateBlur(this.currentImagePosition)
return {
'filter': `blur(${blur}px)`
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment