Closed Hi-Alan closed 11 months ago
代码
const { setPath, start, cancel, stop, proceed, status } = useTrackAnimation(map, { duration: 30000, delay: 300, // >0 tilt: 55, overallView: true, zoom: 14, }) watch(status, (newVal, oldVal) => { // 不会调用 console.log(oldVal ,'->', newVal) })
错误提示
useTrackAnimation.js:40 Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener') at useTrackAnimation.js:40:35
原因 instance.start() 之后, 会延迟 options.delay 之后初始化 instance._viewAni
确实存在这个问题,下个patch版本修复
代码
错误提示
原因 instance.start() 之后, 会延迟 options.delay 之后初始化 instance._viewAni