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
{{ message }}
Repository navigation
Add touch device support using Pointer Events API #63
Currently, the graph only supports mouse events, making it useless on touch devices.
Solution
Add touch device support using the Pointer Events API.
Plan
Add listening pointer events:
In src/components/canvas/graph/index.ts, add listening events: [pointerdown, pointermove, pointerup, pointerleave]. Emit same mouse event on fire these events.
replace listening mouse-events for pointer event in Core-Component.
While looking at the current way of doing things, it turned out to be more complicated than it seemed at first. You need to not just listen to the two fingers but also guess what they're going to do next. Plus, actions like tapping, pinching, and dragging can happen at the same time, which can get confusing.
For this reason, it's better to use a ready-made solution.
There are many ready-made solutions out there, but they all have the same problem — they don't work well with touch. The most popular one is called hammer.js. It has many forks, and you can choose any of them.
In #92 we support dblick. So in this issues we have
In a PR #92, we support double-clicking event on graph. But, before the dbclick-event fired two separate click-events.
We plan to fix it in this issue.
Activity
draedful commentedon May 25, 2025
While looking at the current way of doing things, it turned out to be more complicated than it seemed at first. You need to not just listen to the two fingers but also guess what they're going to do next. Plus, actions like tapping, pinching, and dragging can happen at the same time, which can get confusing.
For this reason, it's better to use a ready-made solution.
There are many ready-made solutions out there, but they all have the same problem — they don't work well with touch. The most popular one is called hammer.js. It has many forks, and you can choose any of them.
draedful commentedon Jun 6, 2025
In #92 we support dblick. So in this issues we have
In a PR #92, we support double-clicking event on graph. But, before the dbclick-event fired two separate click-events.
We plan to fix it in this issue.
draedful commentedon Aug 6, 2025
Camera panning should not block page scrolling #96