naver / egjs-flicking

🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.

Home Page:https://naver.github.io/egjs-flicking/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[IOS][Error] Flicking 객체가 완전히 초기화가 완료된 시점을 알고 싶습니다.

jay-showa opened this issue · comments

commented

Description

환경
Vue 2.7
IOS safari 15.5
컴포넌트 개별 import (Flicking 을 구현하는 컴포넌트 내 import)
css 글로벌 import (main.ts)

Steps to check or reproduce

  1. 템플릿 Flicking 에 ref 추가
  2. ready callback 에서 flicking.moveTo 호출
  3. 스와이프시 Unhandled Promise Rejection: FlickingError: Position "NaN" is not reachable. 에러와 함께 스와이프 동작 안됨.

*특이사항 : 새로고침 후 동작됨.

https://naver.github.io/egjs-flicking/ko/docs/api/ERROR_CODE 문서를 보니

Control#moveToPosition의 position 패러미터가 도달 가능한 범위를 벗어난 경우)의 position 패러미터가 도달 가능한 범위를 벗어난 경우 라고 되어 있는데 언제 스와이프가 가능한지 알고 싶습니다.

감사합니다

commented

이슈해결 했습니다. 창피하지만 다른 분들을 위해 기록을 남깁니다.

  1. autoInit:false 세팅
  2. Flicking 에 사용되는 모든 비동기 데이터를 로드 완료
  3. 데이터를 로드 후 Vue.nextTick() 에서 init()