- From: Jake Archibald via GitHub <sysbot+gh@w3.org>
- Date: Tue, 07 Sep 2021 14:42:30 +0000
- To: public-pointer-events@w3.org
> my understanding so far was that the array contains all points _except_ the one that was actually dispatched as a "real" pointer event - i.e. coalesced list includes all "dropped" points that ended up being coalesced/quietly ignored leading up to the actual one that was sent. So the order is `[one, two, event]`? That isn't clear to me from the spec, and I'm not sure it's developer-friendly either. For example, if you want to do something with all the points, which seems like the common case, you end up doing something like this: ```js ctx.beginPath(); ctx.moveTo(previousEvent.clientX, previousEvent.clientY); for (const event of [...mainEvent.getCoalescedEvents(), mainEvent]) { ctx.lineTo(event.clientX, event.clientY); } ctx.stroke(); ``` Rather than: ```js ctx.beginPath(); ctx.moveTo(previousEvent.clientX, previousEvent.clientY); for (const event of mainEvent.getCoalescedEvents()) { ctx.lineTo(event.clientX, event.clientY); } ctx.stroke(); ``` It also doesn't fit right with the naming for me (I know I know, naming is hard), but you're getting "coalesced" events, not "skipped" events. If I'm asking for the things that were "coalesced" together to form `event`, it feels like it should include the final value too, right? -- GitHub Notification of comment by jakearchibald Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/409#issuecomment-914364597 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 7 September 2021 14:42:33 UTC