fix. 모션 테스트 코드 삭제
This commit is contained in:
@@ -67,12 +67,6 @@ export default defineNuxtPlugin(nuxtApp => {
|
|||||||
el.style.opacity = '0'
|
el.style.opacity = '0'
|
||||||
el.style.transform = 'translateY(30px)'
|
el.style.transform = 'translateY(30px)'
|
||||||
|
|
||||||
// 디버깅: 요소 등록 확인
|
|
||||||
if (import.meta.dev) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log('[motion-stagger] Element mounted:', el.tagName)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 가장 가까운 section 찾기
|
// 가장 가까운 section 찾기
|
||||||
const section = el.closest('section')
|
const section = el.closest('section')
|
||||||
if (!section) {
|
if (!section) {
|
||||||
@@ -87,22 +81,12 @@ export default defineNuxtPlugin(nuxtApp => {
|
|||||||
if (!sectionItems.has(section)) {
|
if (!sectionItems.has(section)) {
|
||||||
sectionItems.set(section, new Set())
|
sectionItems.set(section, new Set())
|
||||||
observeSection(section)
|
observeSection(section)
|
||||||
|
|
||||||
if (import.meta.dev) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log('[motion-stagger] New section registered')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sectionItems.get(section)!.add(el)
|
sectionItems.get(section)!.add(el)
|
||||||
|
|
||||||
// 이미 viewport에 있는 경우 즉시 체크 (여러 번 체크)
|
// 이미 viewport에 있는 경우 즉시 체크 (여러 번 체크)
|
||||||
const inViewport = isSectionInViewport(section)
|
const inViewport = isSectionInViewport(section)
|
||||||
|
|
||||||
if (import.meta.dev) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log('[motion-stagger] Section in viewport:', inViewport)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inViewport) {
|
if (inViewport) {
|
||||||
// 즉시 실행
|
// 즉시 실행
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user