地図:映す範囲の見張りがすり抜ける・パン中に描き直しが多い

Open
#191 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 12 days

@wac9993 is already working on this.

Since Sep 30, 2026.

Assessment

This issue has not been assessed yet.

Description

1. 映す範囲の見張りがすり抜ける(確度は中)

MapView.tsx:222-240 の applyingRef は setTimeout(0) で解けます。ところが fitBounds がアニメーションすると(ズームやパンが変わるときは既定でアニメーションする)、moveend は約 250ms 後に届くので、見張りが効きません。

  • 地図が 1 枚なら、ズームのスナップ分を 1 回報告して落ち着く
  • 大きさの違う地図の泡を 2 枚同時に開くと、store の bounds を共有しているので A→B→A と fitBounds し合い、互いを包もうとして引いていく(最悪 minZoom まで)。窓と海に 1 枚ずつ置ける 5ca0bb23 以降は踏みうる

案:moveend を受けたときに「自分が当てた範囲か」を範囲の値で見る。または fitBounds を animate: false にする。

2. 性能

  • MapBubble.tsx:74-105 の handedPins:インラインのセレクタが毎回新しい MapPin を作るので、shallowEqual が常に不一致になる。何かが渡されているあいだはどの action でも描き直し、routeIds も作り直されて polyline が毎回張り直される。パンのたびに setBounds が出るので、パン中はずっとこの状態
  • MapView.tsx:190:move のたびに setBeat して、全ピン(越後を全景で見ると約 800 個の ObjectView)を毎フレーム描き直す。引いた状態でのパンが重いはず

3. url を手で組み立てている(いまの影響は小さい)

MapBubble.tsx:99 は url を ${type.toLowerCase()}s/${id} で組み立てています。Activity なら activitys/、ItineraryItem なら itineraryitems/ になり、registerObjectUrl と一致しません。ObjectView は url を省けば registerObjectUrl から引くので、手で組み立てる必要はありません。

4. 註が古い

MapView.tsx:383 の CSS の註が「OpenStreetMap の決まり」のままです(地理院タイルの出典表記そのものは :86-90 と :168 で守られています)。

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
9d 13h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fumicode/bublys-org

All issues in fumicode/bublys-org

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.