Skip to content

Make cooperative gestures configurable - #199

Merged
thatbudakguy merged 1 commit into
mainfrom
claude/maplibre-cooperative-gestures-prop-a0ca0e
Aug 26, 2026
Merged

Make cooperative gestures configurable#199
thatbudakguy merged 1 commit into
mainfrom
claude/maplibre-cooperative-gestures-prop-a0ca0e

Conversation

@thatbudakguy

Copy link
Copy Markdown
Member

Summary

  • Adds a cooperativeGestures prop (default true, matching current behavior) to <ogm-preview>, <ogm-overview>, and <ogm-locator> — and to <ogm-map>, which <ogm-preview> delegates to for map-based previews.
  • Each map reacts live to the prop via MapLibre's cooperativeGestures.enable()/disable(), the same pattern already used for <ogm-overview>'s geosearch prop.
  • Documents the new prop in the readme.

Closes #168 — makes the modifier-key requirement for scroll-to-zoom configurable instead of always-on, per the discussion on that issue.

Test plan

  • npm run lint (tsc + prettier)
  • npm run build
  • npm test (1102 tests)
  • Manually verified in a running dev server: by default, an unmodified scroll wheel over <ogm-locator>/<ogm-overview> is blocked and shows MapLibre's hint overlay; setting cooperative-gestures="false" lets the scroll wheel zoom immediately.

🤖 Generated with Claude Code

A reader stuck scrolling past an embedded map has had no way to turn off
the modifier-key requirement short of forking the library. <ogm-preview>,
<ogm-overview>, and <ogm-locator> now take a cooperative-gestures prop,
on by default to match the existing behavior.

Closes #168

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thatbudakguy
thatbudakguy force-pushed the claude/maplibre-cooperative-gestures-prop-a0ca0e branch from a8766d0 to 2fc0f93 Compare August 26, 2026 00:30
@thatbudakguy
thatbudakguy merged commit 542dfa7 into main Aug 26, 2026
2 checks passed
@thatbudakguy
thatbudakguy deleted the claude/maplibre-cooperative-gestures-prop-a0ca0e branch August 26, 2026 00:33
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.

Reconsider ctrl+scroll wheel for map zoom

1 participant