diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:14 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
| commit | c05efa8d7ae464235cf83d7c0956e42dc6974103 (patch) | |
| tree | 6ea911b2f2010f63a026de6bb7a1a51e7690a7e1 /files/fr/web/api/window/deviceorientation_event/index.html | |
| parent | 13a5e017558b248ee1647d4a5825f183b51f09ad (diff) | |
| download | translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.gz translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.bz2 translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.zip | |
move *.html to *.md
Diffstat (limited to 'files/fr/web/api/window/deviceorientation_event/index.html')
| -rw-r--r-- | files/fr/web/api/window/deviceorientation_event/index.html | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/files/fr/web/api/window/deviceorientation_event/index.html b/files/fr/web/api/window/deviceorientation_event/index.html deleted file mode 100644 index 3978ebe617..0000000000 --- a/files/fr/web/api/window/deviceorientation_event/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: 'Window : l''événement deviceorientation' -slug: Web/API/Window/deviceorientation_event -tags: - - Device Orientation API - - Sensors - - Window Event - - events -translation_of: Web/API/Window/deviceorientation_event -original_slug: FUEL/Window/deviceorientation ---- -<div>{{APIRef}}</div> - -<p>L'événement <code>deviceorientation</code> est déclenché lorsque des données sont disponibles, à partir d'un capteur d'orientation, sur l'orientation actuelle de l'appareil par rapport au cadre de coordonnées de la Terre. Ces données sont recueillies à partir d'un magnétomètre à l'intérieur de l'appareil. Voir <a href="/fr/docs/Web/Guide/Events/Orientation_and_motion_data_explained">Données d'orientation et de mouvement expliquées</a> pour plus de détails.</p> - -<table class="properties"> - <tbody> - <tr> - <th scope="row">Propagation</th> - <td>Non</td> - </tr> - <tr> - <th scope="row">Annulable</th> - <td>Non</td> - </tr> - <tr> - <th scope="row">Interface</th> - <td><a href="/fr/docs/Web/API/DeviceOrientationEvent"><code>DeviceOrientationEvent</code></a></td> - </tr> - <tr> - <th scope="row">Propriété du gestionnaire d'événements</th> - <td><a href="/fr/docs/Web/API/Window/ondeviceorientation"><code>window.ondeviceorientation</code></a></td> - </tr> - </tbody> -</table> - -<h2 id="example">Exemple</h2> - -<pre class="brush: js">if (window.DeviceOrientationEvent) { - window.addEventListener("deviceorientation", function(event) { - // alpha : rotation autour de l'axe z - var rotateDegrees = event.alpha; - // gamma : de gauche à droite - var leftToRight = event.gamma; - // bêta : mouvement avant-arrière - var frontToBack = event.beta; - - handleOrientationEvent(frontToBack, leftToRight, rotateDegrees); - }, true); -} - -var handleOrientationEvent = function(frontToBack, leftToRight, rotateDegrees) { - // faire quelque chose d'étonnant -};</pre> - -<h2 id="specifications">Spécifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Spécification</th> - <th scope="col">Statut</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName("Device Orientation", "#deviceorientation", "l'événement DeviceOrientation")}}</td> - <td>{{Spec2("Device Orientation")}}</td> - </tr> - </tbody> -</table> - -<h2 id="browser_compatibility">Compatibilité des navigateurs</h2> - -<p>{{Compat("api.Window.deviceorientation_event")}}</p> - -<h2 id="see_also">Voir aussi</h2> - -<ul> - <li>L'événement <a href="/fr/docs/Web/API/Window/devicemotion_event"><code>devicemotion</code></a></li> - <li><a href="/fr/docs/Web/API/Detecting_device_orientation">Détection de l'orientation des appareils.</a></li> - <li><a href="/fr/docs/Web/Guide/Events/Orientation_and_motion_data_explained">Explication des données d'orientation et de mouvement</a></li> - <li>Simulation d'événements d'orientation sur les navigateurs de bureau avec <a href="https://louisremi.github.com/orientation-devtool/">orientation-devtool</a>.</li> -</ul> |
