Re: [w3c/gamepad] Enhance Gamepad interface description for Touch (PR #168)

@nondebug commented on this pull request.

The extensions.html content looks good to me, I think this can be merged once the formatting issues are fixed.

> +                    <p>|position|[0] should be set to the device X coordinate relative to the device [=touch surface=] and normalized to [-1.0,1.0]
+                      where -1.0 is the leftmost coordinate and 1.0 is the rightmost coordinate.
+                    </p>
+                    <p class="note" title="Possible implementation (if surfaceDimensions are available)">
+                      `position[0] = (2.0 * touchData.x / surfaceDimensions[0]) - 1`
+                    </p>
+                  </li>
+                  <li>
+                    <p>|position|[1] should be set to the device Y coordinate relative to the device [=touch surface=] and normalized to [-1.0,1.0]
+                      where -1.0 is the topmost coordinate and 1.0 is the bottommost coordinate.
+                    </p>
+                    <p class="note" title="Possible implementation (if surfaceDimensions are available)">
+                      `position[1] = (2.0 * touchData.y / surfaceDimensions[1]) - 1`
+                    </p>
+                  </li>
+                  </li>

Please remove the extra `</li>`.

> +                [=active touch point=]
+                reported by the |gamepad| for the current [=touch surface=].
+                <ol>
+                  <li>
+                    Let |nextTouchId:unsigned long| be the next available touchId for the |gamepad|.
+                  </li>
+                  <li>Let |touchEvent:GamepadTouch| be a {{GamepadTouch}}.
+                  </li>
+                  <li>Set |touchEvent|.{{GamepadTouch/surfaceId}} to be
+                    |surfaceId|.
+                  </li>
+                  <li>If the touch data is part of an existing 
+                    [=active touch point=]
+                    tracked by the user agent:
+                    <ol>
+                    <li>Set |touchEvent|.{{GamepadTouch/touchId}} to the touchId of the [=active touch point=].

Please use [HTML Tidy](https://www.html-tidy.org/) to update the formatting in this file.

This command will fix formatting errors in extensions.html, overwriting the input file:

`tidy -config tidyconfig.txt -m extensions.html`

> @@ -50,7 +50,7 @@
                 company: "Google", companyURL: "http://www.google.com/",
                 w3cid: 87824 },
           ],
-
+          xref: true,

Please remove this `xref` in favor of the `xref` below with a list of specification short names.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/168#pullrequestreview-1214400122
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/168/review/1214400122@github.com>

Received on Monday, 12 December 2022 22:36:34 UTC