d3 / d3-drag

Drag and drop SVG, HTML or Canvas using mouse or touch input.

Home Page:https://d3js.org/d3-drag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support pointer events?

natevw opened this issue · comments

Carrying this over from d3/d3#2556. The new d3-drag is (at least in my mind) very similar conceptually to what Pointer Events do: unify touch/mouse into a single API that generically tracks "engaged movement".

The readme here already mentions this:

Best of all, the drag behavior automatically unifies mouse and touch input, and avoids browser idiosyncrasies. When Pointer Events are more widely available, the drag behavior will support those, too.

So I'm filing this as an official ticket to track pointer events support in d3-drag, so I can reference it as necessary :-)

[Would love to personally contribute support based on some of my earlier work, but unfortunately don't have an active client project that needs it at the moment, and I've been horrible at keeping "evenings and weekends" promises lately, sorry…]

commented

This might become relevant because it seems to me like Google now also wants to push pointer events more especially for devices/setups where both touch and mouse are used because of badly programmed pages which only register events for one of the other, see https://crbug.com/392584 and https://crbug.com/557565.

No current plans to do this, but I might consider it in the future now that Safari has announced support for it in 13+.

The support for pointer events is quite good already https://caniuse.com/pointer Are you still thinking about adding it to d3-drag @mbostock ?