Skip to content

Point the submodules at the marker click fix and drop CirclePage's workaround - #48

Merged
wf9a5m75 merged 3 commits into
developfrom
fix/marker-drag-click-leak
Nov 9, 2026
Merged

wf9a5m75 merged 3 commits into
developfrom
fix/marker-drag-click-leak

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

なぜ

マーカーを掴んだジェスチャの後のブラウザの click が地図に届き、頂点ドラッグを離した位置のポリゴンがクリックされたり、clickable なマーカーの onClick が 2 回出たりしていた(GL 系・deck.gl)。Azure はドラッグのしきい値が無く、動かさずに離しても dragEnd + 下のサークルの onClick が出ていた。修正は各サブモジュールでマージ済み:

何を変えたか

  • gitlink: js-sdk-core / react-for-deckgl / react-for-azuremaps を上の develop のマージ commit に向けた。
  • examples/basic の CirclePage: マーカーのドラッグ直後のサークルのクリックを握りつぶしていた SUPPRESS_CIRCLE_CLICK_AFTER_MARKER_DRAG_MS を外した。SDK 側で直ったので不要(外したことで Azure の不具合が見えるようになり、build(deps-dev): bump undici from 8.10.0 to 8.11.2 #14 で直した)。

検証

  • scripts/api-surface.mjs check js-sdk-core react-for-deckgl react-for-azuremaps: ok。
  • サブモジュールのテスト: js-sdk-core 266 件・react-for-deckgl 7 件・react-for-azuremaps 11 件 pass。
  • example を Playwright(Chromium)で、MapLibre・deck.gl・Azure の Polygon / Circle ページを同じ手順で操作。3 本とも全 18 ステップで結果が一致:
    • マーカー/頂点のタップ(動かさない・1 px 揺らす): clickable なマーカーは onClick ×1、clickable: false の頂点ハンドルは下のポリゴン ×1
    • ドラッグ: dragEnd ×1 のみ(離した位置のポリゴン/サークルはクリックされない)
    • ポリゴン内外のクリック・空き地のパン: 従来どおり

確認できていないもの

  • タッチ入力、Safari / Firefox。
  • npm publish はしていない。npm 版の react-for-* が使う js-sdk-core(^0.3.x)には、次の publish まで修正が入らない。

js-sdk-core fix/marker-drag-click-leak (a3443c7): the click that ends a
marker gesture no longer reaches the map, a tap on a draggable marker is
delivered once, and a clickable: false marker passes the tap through to
what is under it, as on Android.

react-for-deckgl fix/marker-drag-click-leak (d33041b): deck.gl skips the
tap the core already delivered.

Both are local branches; repoint these at the merge commits before this
goes up.
The sample ignored circle clicks for 300 ms after the edge marker's
onDragEnd, because releasing the dragged marker over the circle clicked
the circle on the GL providers. js-sdk-core now keeps that click off the
map, so the workaround is no longer needed.
The marker click fix is merged in all three:
- js-sdk-core#31 (3d2d349): swallow the click that ends a marker gesture,
  pass a clickable: false tap down the map's cascade, mark the pointerup;
- react-for-deckgl#10 (c7b6c91): skip the tap the core already delivered;
- react-for-azuremaps#14 (1f24e70): drag markers through the core's
  DefaultMarkerEventController (drag threshold, no click after release).
@wf9a5m75
wf9a5m75 merged commit 7784da0 into develop Nov 9, 2026
3 checks passed
@wf9a5m75
wf9a5m75 deleted the fix/marker-drag-click-leak branch November 9, 2026 05:41
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.

1 participant