feat: 단풍 지도 디자인 검수 반영 — 카드 2장(지도·순위), 라벨 눌러 고르기, 엑스 없앤 선택 줄, 명소마다 공유 이미지, 시·도 이름, 밤 화면 글자, 확대할수록 이름
This commit is contained in:
1 parent
d75144a6ac
commit
1888dd6cf3
7 files changed
+448
-146
No files matched your search
@@ -220,15 +220,22 @@ function Shell() {
|
||||
window.scrollTo({ top: 0 })
|
||||
return
|
||||
}
|
||||
// 피드가 다시 그려져 그 높이가 될 때까지 몇 프레임 기다리며 맞춘다
|
||||
// 피드가 다시 그려져 그 높이가 될 때까지 최대 3초 맞추고, 그 사이 사람이 화면을 만지면 멈춘다
|
||||
let tries = 0
|
||||
let raf = 0
|
||||
const stop = () => cancelAnimationFrame(raf)
|
||||
const go = () => {
|
||||
window.scrollTo({ top })
|
||||
if (Math.abs(window.scrollY - top) > 2 && ++tries < 60) raf = requestAnimationFrame(go)
|
||||
if (Math.abs(window.scrollY - top) > 2 && ++tries < 180) raf = requestAnimationFrame(go)
|
||||
}
|
||||
go()
|
||||
return () => cancelAnimationFrame(raf)
|
||||
window.addEventListener('touchstart', stop, { once: true, passive: true })
|
||||
window.addEventListener('wheel', stop, { once: true, passive: true })
|
||||
return () => {
|
||||
stop()
|
||||
window.removeEventListener('touchstart', stop)
|
||||
window.removeEventListener('wheel', stop)
|
||||
}
|
||||
}, [pathname, key, navType])
|
||||
// 지금 보고 있는 탭을 다시 누르면 맨 위로
|
||||
const toTopIfHere = (to: string) => () => {
|
||||
|
||||
Reference in new issue
Block a user