Scope animations
This commit is contained in:
@@ -6,11 +6,11 @@ import { animDuration } from '../utils/store'
|
||||
/*
|
||||
** Transition In
|
||||
*/
|
||||
export const animateIn = () => {
|
||||
export const animateIn = scope => {
|
||||
// Card: Active
|
||||
const cardActive = ScrollOut({
|
||||
once: true,
|
||||
targets: '.gallery__photo--active',
|
||||
targets: scope.querySelector('.gallery__photo--active'),
|
||||
onShown (el) {
|
||||
anime({
|
||||
targets: el,
|
||||
@@ -25,7 +25,7 @@ export const animateIn = () => {
|
||||
// Card: Prev
|
||||
const cardPrev = ScrollOut({
|
||||
once: true,
|
||||
targets: '.gallery__photo--prev',
|
||||
targets: scope.querySelector('.gallery__photo--prev'),
|
||||
onShown (el) {
|
||||
anime({
|
||||
targets: el,
|
||||
@@ -41,7 +41,7 @@ export const animateIn = () => {
|
||||
// Card: Prev
|
||||
const cardNext = ScrollOut({
|
||||
once: true,
|
||||
targets: '.gallery__photo--next',
|
||||
targets: scope.querySelector('.gallery__photo--next'),
|
||||
onShown (el) {
|
||||
anime({
|
||||
targets: el,
|
||||
|
||||
Reference in New Issue
Block a user