You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/mapml-viewer-api.mdx
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -361,19 +361,13 @@ Check out [this application](https://maps4html.org/experiments/api/custom-map-ui
361
361
362
362
### matchMedia(mediaQueryString)
363
363
364
-
While not strictly 'media' features, some dynamic map properties can be combined in queries
365
-
with standard media features, for example the 'prefers-color-scheme' feature,
364
+
While not strictly 'media' features, some dynamic map properties can be combined in queries with standard media features, for example the 'prefers-color-scheme' feature,
366
365
to enable a map container / media-query-like interface.
367
366
368
367
`matchMedia(mediaQueryString)` returns a [MediaQueryList-like object](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList).
369
-
The `matches` boolean-valued property of the object can be used for an immediate
370
-
determination of whether the map meets the queried feature conditions. To react to changes in
371
-
the map state / media conditions, use MediaQueryList.addEventListener('change', callbackFn)
372
-
to add an event listener for `change` events that are triggered by changes in the
373
-
state of the queried map properties (projection, zoom, extent); any change to the
triggers the `change` event and calls the callbackFn.
368
+
The `matches` boolean-valued property of the object can be used for an immediate determination of whether the map meets the queried feature conditions. To react to changes in
369
+
the map state / media conditions, use MediaQueryList.addEventListener('change', callbackFn) to add an event listener for `change` events that are triggered by changes in the
370
+
state of the queried map properties (projection, zoom, extent); any change to the map that results in a change in state of the [MediaQueryListEvent `matches` boolean property](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event)triggers the `change` event and calls the callbackFn.
Copy file name to clipboardExpand all lines: i18n/fr/docusaurus-plugin-content-docs/current/api/mapml-viewer-api.mdx
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -367,10 +367,7 @@ Jetez un coup d’œil à [cette application](https://maps4html.org/experiments/
367
367
368
368
Bien que cela ne soit pas strictement des fonctionnalités "média", certaines propriétés dynamiques de la carte peuvent être combinées dans des requêtes avec des fonctionnalités média standard, comme la fonctionnalité 'prefers-color-scheme', pour permettre une interface de type conteneur de carte / requête média.
369
369
370
-
`matchMedia(mediaQueryString)` renvoie un [objet similaire à MediaQueryList](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList).
371
-
La propriété booléenne `matches` de l'objet peut être utilisée pour déterminer immédiatement si la carte répond aux conditions des fonctionnalités requises.
372
-
Pour réagir aux changements dans l'état de la carte ou des conditions média, utilisez `MediaQueryList.addEventListener('change', callbackFn)` pour ajouter un écouteur d'événements aux événements `change` déclenchés par les modifications de l'état des propriétés de la carte interrogées (projection, zoom, étendue).
373
-
Tout changement de la carte qui entraîne une modification de l'état de la propriété booléenne `matches` de [MediaQueryListEvent](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event) déclenche l'événement `change` et appelle la fonction `callbackFn`.
370
+
`matchMedia(mediaQueryString)` renvoie un [objet similaire à MediaQueryList](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList). La propriété booléenne `matches` de l'objet peut être utilisée pour déterminer immédiatement si la carte répond aux conditions des fonctionnalités requises. Pour réagir aux changements dans l'état de la carte ou des conditions média, utilisez `MediaQueryList.addEventListener('change', callbackFn)` pour ajouter un écouteur d'événements aux événements `change` déclenchés par les modifications de l'état des propriétés de la carte interrogées (projection, zoom, étendue). Tout changement de la carte qui entraîne une modification de l'état de la propriété booléenne `matches` de [MediaQueryListEvent](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event) déclenche l'événement `change` et appelle la fonction `callbackFn`.
374
371
375
372
## Fonctionnalités de requête "média" prises en charge pour la carte
0 commit comments