fix. 모션 테스트 코드 삭제

This commit is contained in:
clkim
2026-01-15 17:40:45 +09:00
parent 7e54b77597
commit 85eacdb11b

View File

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