Skip to content

fix(map): 최소 배율에서 휠·트랙패드 확대가 화면에 반영되지 않는 문제 수정 - #244

Merged
minbros merged 1 commit into
mainfrom
hotfix/map-min-zoom-scroll
Oct 22, 2026
Merged

minbros merged 1 commit into
mainfrom
hotfix/map-min-zoom-scroll

Conversation

@KangShinGyu98

Copy link
Copy Markdown
Collaborator

노션

변경 내용

  • 가로 래핑 방지 center_changed 가드(MapPreventHorizontalWrap)를 삭제했습니다. 가로 래핑은 기존 MAP_PAN_RESTRICTION(경도 ±179.999, strictBounds)만으로 막습니다.
  • MAP_PAN_RESTRICTION에 center_changed에서 bounds를 보고 되돌리면 안 되는 이유를 주석으로 남겼습니다.
  • dev에서도 같은 함수가 바뀌어 있어(moveMapTo·isMobileDevice 분기) main → dev 백머지 때 충돌이 납니다. 삭제하는 쪽으로 해결하면 됩니다.

변경 이유

  • 휠·트랙패드로 확대하면 구글이 setCenter 다음에 setZoom을 부릅니다. 그 사이 center_changed의 bounds(새 중심 + 이전 줌)는 최소 배율 근처에서 날짜변경선을 넘은 것처럼 계산되고, 가드가 이를 래핑으로 잘못 판단해 panTo로 되돌렸습니다. 그래서 확대가 끊겨 줌 값만 바뀌고 화면은 그대로 멈췄습니다.

테스트

  • npm run lint
  • npm test (.env.local 환경변수를 넣고 실행했습니다. 넣지 않으면 36개 파일이 NEXT_PUBLIC_API_BASE_URL이 없어 불러오기에서 실패하며, 이번 변경과는 무관합니다)
  • npm run build
  • 브라우저 확인(Claude가 PC 크롬에 실제 휠 입력): 최소 배율의 동쪽 끝(일본)과 서쪽 끝(미국)에서 휠로 확대하면 화면에 반영됨, 양쪽 끝까지 드래그하면 ±180°에서 멈추고 래핑 없음, +/− 버튼 정상, 콘솔 에러 없음
  • 그 외 수동 검증: 모바일, PC 모두 확인

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontend-server Ready Ready Preview Oct 22, 2026 6:36am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c522f23f-34a4-47e3-9149-3442cc30eed7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@minbros
minbros merged commit d89e06a into main Oct 22, 2026
5 checks passed
@minbros
minbros deleted the hotfix/map-min-zoom-scroll branch October 22, 2026 14:14

This branch was successfully deployed

1 active deployment
Preview — 124b4f94 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants