From 161a05344e03fcbf7c7b95dc72b7d6fdd7095aa5 Mon Sep 17 00:00:00 2001 From: Jeremy Dumaye Date: Mon, 19 Dec 2022 10:55:12 +0100 Subject: [PATCH] add cooperativeGestures and locale options --- docs/api/README.md | 14 ++++++++++++++ src/components/map/options.js | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/api/README.md b/docs/api/README.md index c7365d69..dc85f319 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -295,6 +295,20 @@ - **Description:** A `fitBounds` object to use only when fitting the initial `bounds` provided above - **See:** `options.fitBoundsOptions` in [Map](https://docs.mapbox.com/mapbox-gl-js/api/#map) +### `cooperativeGestures` + +- **Type:** `Boolean` +- **Default:** `true` +- **Description:** If true , scroll zoom will require pressing the ctrl or ⌘ key while scrolling to zoom map, and touch pan will require using two fingers while panning to move the map. Touch pitch will require three fingers to activate if enabled. +- **See:** `options.cooperativeGestures` in [Map](https://docs.mapbox.com/mapbox-gl-js/api/#map) + +### `locale` + +- **Type:** `Object` +- **Default:** `undefined` +- **Description:** A patch to apply to the default localization table for UI strings such as control tooltips. The locale object maps namespaced UI string IDs to translated strings in the target language. +- **See:** `options.locale` in [Map](https://docs.mapbox.com/mapbox-gl-js/api/#map) + ## Actions Asynchronous actions exposed via `GlMap.actions` diff --git a/src/components/map/options.js b/src/components/map/options.js index 8ce369a0..80968cc1 100644 --- a/src/components/map/options.js +++ b/src/components/map/options.js @@ -186,5 +186,13 @@ export default { crossSourceCollisions: { type: Boolean, default: true + }, + cooperativeGestures: { + type: Boolean, + default: true + }, + locale: { + type: Object, + default: undefined } };